mirror of
https://github.com/wahyd4/say-it.git
synced 2026-08-08 21:02:13 +10:00
Add release note for 0.3.0
This commit is contained in:
@@ -3,33 +3,34 @@
|
||||
It just like the `say` command in Mac OSX, but born to be much powerful. We used [Baidu Yuyin](http://yuyin.baidu.com/) as the TTS engine. You need to have network access to use this tool. The pronunciation of Chinese is much better than English. Generally this could be a tool to help you to learn Chinese or English.
|
||||
|
||||
## Install
|
||||
1. The go way
|
||||
|
||||
go get -u github.com/wahyd4/say-it
|
||||
|
||||
2. The standalone way, please go to releases page to download the binary application then execute it
|
||||
|
||||
## How to use
|
||||
|
||||
`say-it 'Hello 世界'`
|
||||
`say-it "Hello 世界"`
|
||||
|
||||
`say-it -p 3 '春晓 孟浩然 春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少。'`
|
||||
`say-it -p 3 "春晓 孟浩然 春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少。"`
|
||||
|
||||
`say-it -p 4 "Life is like riding a bicycle. To keep your balance, you must keep moving. ― Albert Einstein"`
|
||||
|
||||
`say-it --help`
|
||||
|
||||
|
||||
## Language support limit
|
||||
Due to Baidu Yuyin's limit, right now we only support Chinese and English.
|
||||
|
||||
## Compatibility
|
||||
|
||||
This is package is developed and tested against under `macOS Sierra`, but it should be worked on all Mac platforms if you can install the latest stable version of Node. For `Linux` and `Windows` users, please make sure you have at least one of the players installed from the list.
|
||||
This is package is developed and tested against under `macOS Sierra` and `Windows 10`, For windows user please make sure download `cmdmp3` and add it to PATH environment.
|
||||
For macOS user we used `afplay` which is already installed by default, so you don't need to anything.
|
||||
Currently we don't have plan to support `Linux`
|
||||
|
||||
|
||||
* [`mplayer`](https://www.mplayerhq.hu/)
|
||||
* [`afplay`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/afplay.1.html)
|
||||
* [`mpg123`](http://www.mpg123.de/)
|
||||
* [`mpg321`](http://mpg321.sourceforge.net/)
|
||||
* [`play`](http://sox.sourceforge.net/)
|
||||
* [`omxplayer`](https://github.com/popcornmix/omxplayer)
|
||||
* [`aplay`](https://linux.die.net/man/1/aplay)
|
||||
* [`cmdmp3`](https://github.com/jimlawless/cmdmp3)
|
||||
|
||||
|
||||
@@ -39,6 +40,7 @@ It just like the `say` command in Mac OSX, but born to be much powerful. We used
|
||||
* 0.1.3 Add ability to allow user set different voice.
|
||||
* 0.1.7 Allow user to set voice speed and pitch.
|
||||
* 0.2.0 Use go to re-implement the features.
|
||||
* 0.3.0 Add support for Windows users.
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
@@ -61,11 +61,11 @@ func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "say-it"
|
||||
app.Usage = "TTS in command line -- Pronounce the Chinese and English words you typed in."
|
||||
app.Version = "0.2.0"
|
||||
app.Version = "0.3.0"
|
||||
setFlags(app)
|
||||
app.Action = func(c *cli.Context) error {
|
||||
if len(c.Args()) == 0 {
|
||||
fmt.Println("Please type some words. e.g. say-it '你好, 世界'")
|
||||
fmt.Println("Please type some words. e.g. say-it \"你好, 世界\"")
|
||||
return nil
|
||||
}
|
||||
words := c.Args().Get(0)
|
||||
@@ -163,7 +163,7 @@ func speak() {
|
||||
}
|
||||
return
|
||||
}
|
||||
command := exec.Command("cmdmp3.exe", getAudioFilePath())
|
||||
command := exec.Command("cmdmp3", getAudioFilePath())
|
||||
|
||||
if err := command.Run(); err != nil {
|
||||
log.Error("Failed to say the words: " + err.Error())
|
||||
@@ -192,6 +192,5 @@ func getAudioFilePath() string {
|
||||
if runtime.GOOS == "darwin" {
|
||||
return utils.HomeDir() + MP3FileName
|
||||
}
|
||||
fmt.Println(utils.HomeDir() + WindowsMP3FileName)
|
||||
return utils.HomeDir() + WindowsMP3FileName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user