coqui_tts
Open Source Module wrapping coqui's library for text to speech.
This is a functional but messy wrapper of coqui's TTS library for speech synthesis.
TODO this file is still in need of a large amount of cleanup
CoquiSpeak
Setup Model and perform synthesis
Speakers of note for the vits model
267!,307 - English male, medium 330!,232 - English male, slow 312!,251 - English male, fast 287,254 - English male, fast and deep 303 - English female, slow 306 - English female, medium 308 - English female, slow 295!,270 - American female, slow 317! - American male, slow 230! - American male, fast 345 - south african female, slow 313,233 - ? male, fast
Source code in backend/app/utils/tts/backends/coqui_tts.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
synthesize_wav(text, speaker_id='', style_wav='')
Turn text into a wav file and return byte stream
Source code in backend/app/utils/tts/backends/coqui_tts.py
create_argparser()
Parse args to set defaults
Source code in backend/app/utils/tts/backends/coqui_tts.py
main()
Integration testing of Coqui Speaker
Source code in backend/app/utils/tts/backends/coqui_tts.py
style_wav_uri_to_dict(style_wav)
Transform an uri style_wav, in either a string (path to wav file to be use for style transfer) or a dict (gst tokens/values to be use for styling)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_wav |
str
|
uri |
required |
Returns:
| Type | Description |
|---|---|
Union[str, dict]
|
Union[str, dict]: path to file (str) or gst style (dict) |