Browse Source

Removed extra hyphen from 'db' flag to be compliant with latest Go versions.

master
Ruel Tmeizeh 3 years ago
parent
commit
a36fea21d3
2 changed files with 33 additions and 21 deletions
  1. +23
    -11
      README.md
  2. +10
    -10
      main.go

+ 23
- 11
README.md View File

@ -19,33 +19,45 @@ Run ```gsquawk -h``` to see the help:
```
Usage of ./gsquawk:
--db float
-db float
Volume gain in dB. [-96 to 16]
(default 0)
-f string
Audio format selection. MP3 is 32k [mp3,opus,pcm,ulaw,alaw] (default "mp3")
Audio format selection. PCM is uncompressed best quality. Opus is
excellent quality. MP3 is 32kb bitrate. [pcm,opus,mp3,ulaw,alaw]
(default "mp3")
-g string
Gender selection. [m,f,n] 'n' means neutral/don't care. (default "m")
Gender selection. [m,f,n] 'n' means neutral/don't care.
(default "m")
-i string
Input file path. Defaults to stdin. (default "-")
Input file path. Defaults to stdin.
(default "-")
-l string
Language selection. 'en-US', 'en-GB', 'en-AU', 'en-IN',
'el-GR', 'ru-RU', etc. (default "en-US")
'el-GR', 'ru-RU', etc.
(default "en-US")
-listvoices
List available voices, rather than generate TTS. Use in
combination with '-l ALL' to show voices from all languages.
-o string
Output file path. Use '-' for stdout. (default "./tts.mp3")
Output file path. Use '-' for stdout.
(default "./tts.mp3")
-p float
Pitch. E.g. '0.0' is normal. '20.0' is highest,
'-20.0' is lowest. (default 1)
'-20.0' is lowest.
(default 0)
-r int
Samplerate in Hz. [8000,11025,16000,22050,24000,32000,44100,48000] (default 24000)
Samplerate in Hz. [8000,11025,16000,22050,24000,32000,44100,48000]
(default 24000)
-s float
Speed. E.g. '1.0' is normal. '2.0' is double
speed, '0.25' is quarter speed, etc. (default 1)
speed, '0.25' is quarter speed, etc.
(default 1)
-ssml
Input is SSML format, rather than plain text.
-v string
Voice. If specified, this overrides language & gender. (default "unspecified")
Voice. If specified, this overrides language & gender.
(default "unspecified")
```

+ 10
- 10
main.go View File

@ -36,16 +36,16 @@ func main() {
opts := &CommandlineOptions{
ListVoices: flag.Bool("listvoices", false, "List available voices, rather than generate TTS. Use in\ncombination with '-l ALL' to show voices from all languages."),
Ssml: flag.Bool("ssml", false, "Input is SSML format, rather than plain text."),
Input: flag.String("i", "-", "Input file path. Defaults to stdin."),
Output: flag.String("o", "./tts.mp3", "Output file path. Use '-' for stdout."),
Language: flag.String("l", "en-US", "Language selection. 'en-US', 'en-GB', 'en-AU', 'en-IN',\n'el-GR', 'ru-RU', etc."),
Gender: flag.String("g", "m", "Gender selection. [m,f,n] 'n' means neutral/don't care."),
Format: flag.String("f", "mp3", "Audio format selection. MP3 is 32k [mp3,opus,pcm,ulaw,alaw]"),
Voice: flag.String("v", "unspecified", "Voice. If specified, this overrides language & gender."),
Speed: flag.Float64("s", 1.0, "Speed. E.g. '1.0' is normal. '2.0' is double\nspeed, '0.25' is quarter speed, etc."),
Pitch: flag.Float64("p", 1.0, "Pitch. E.g. '0.0' is normal. '20.0' is highest,\n'-20.0' is lowest."),
SampleRate: flag.Int("r", 24000, "Samplerate in Hz. [8000,11025,16000,22050,24000,32000,44100,48000]"),
VolumeGain: flag.Float64("-db", 0.0, "Volume gain in dB. [-96 to 16]"),
Input: flag.String("i", "-", "Input file path. Defaults to stdin.\n"),
Output: flag.String("o", "./tts.mp3", "Output file path. Use '-' for stdout.\n"),
Language: flag.String("l", "en-US", "Language selection. 'en-US', 'en-GB', 'en-AU', 'en-IN',\n'el-GR', 'ru-RU', etc.\n"),
Gender: flag.String("g", "m", "Gender selection. [m,f,n] 'n' means neutral/don't care.\n"),
Format: flag.String("f", "mp3", "Audio format selection. PCM is uncompressed best quality. Opus is\nexcellent quality. MP3 is 32kb bitrate. [pcm,opus,mp3,ulaw,alaw]\n"),
Voice: flag.String("v", "unspecified", "Voice. If specified, this overrides language & gender.\n"),
Speed: flag.Float64("s", 1.0, "Speed. E.g. '1.0' is normal. '2.0' is double\nspeed, '0.25' is quarter speed, etc.\n"),
Pitch: flag.Float64("p", 0.0, "Pitch. E.g. '0.0' is normal. '20.0' is highest,\n'-20.0' is lowest.\n (default 0)"),
SampleRate: flag.Int("r", 24000, "Samplerate in Hz. [8000,11025,16000,22050,24000,32000,44100,48000]\n"),
VolumeGain: flag.Float64("-db", 0.0, "Volume gain in dB. [-96 to 16]\n (default 0)"),
}
flag.Parse()


Loading…
Cancel
Save