Skip to content

Commit fdd443b

Browse files
author
matatonic
committed
0.17.1
1 parent 02a6c7e commit fdd443b

5 files changed

+15
-4
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ If you find a better voice match for `tts-1` or `tts-1-hd`, please let me know s
3030

3131
## Recent Changes
3232

33+
Version 0.17.1, 2024-07-01
34+
35+
* fix ROCm (add langdetect to requirements-rocm.txt)
36+
* Fix zh-cn for xtts
37+
3338
Version 0.17.0, 2024-07-01
3439

3540
* Automatic language detection, thanks [@RodolfoCastanheira](https://github.com/RodolfoCastanheira)

add_voice.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
parser.add_argument('sample', action='store', help="Set the wav sample file")
1313
parser.add_argument('-n', '--name', action='store', help="Set the name for the voice (by default will use the WAV file name)")
14-
parser.add_argument('-l', '--language', action='store', default="en", help="Set the language for the voice",
15-
choices=['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'ja', 'hu', 'ko'])
14+
parser.add_argument('-l', '--language', action='store', default="auto", help="Set the language for the voice",
15+
choices=['auto', 'en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'ja', 'hu', 'ko', 'hi'])
1616
parser.add_argument('--openai-model', action='store', default="tts-1-hd", help="Set the openai model for the voice")
1717
parser.add_argument('--xtts-model', action='store', default="xtts", help="Set the xtts model for the voice (if using a custom model, also set model_path)")
1818
parser.add_argument('--model-path', action='store', default=None, help="Set the path for a custom xtts model")

requirements-rocm.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ uvicorn
33
loguru
44
piper-tts
55
coqui-tts
6+
langdetect
67
# Creating an environment where deepspeed works is complex, for now it will be disabled by default.
78
#deepspeed
89
torch; --index-url https://download.pytorch.org/whl/rocm5.7; sys_platform == "linux"

speech.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ async def generate_speech(request: GenerateSpeechRequest):
296296
hf_generate_kwargs['enable_text_splitting'] = hf_generate_kwargs.get('enable_text_splitting', True) # change the default to true
297297

298298
if hf_generate_kwargs['enable_text_splitting']:
299-
all_text = split_sentence(input_text, language, xtts.xtts.tokenizer.char_limits[language])
299+
if language == 'zh-cn':
300+
split_lang = 'zh'
301+
else:
302+
split_lang = language
303+
all_text = split_sentence(input_text, split_lang, xtts.xtts.tokenizer.char_limits[split_lang])
300304
else:
301305
all_text = [input_text]
302306

voice_to_speaker.default.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ tts-1-hd:
4646
model: xtts
4747
speaker: voices/shimmer.wav
4848
me:
49-
model: xtts_v2.0.2 # you can specify different xtts version
49+
model: xtts_v2.0.2 # you can specify an older xtts version
5050
speaker: voices/me.wav # this could be you
51+
language: auto
5152
enable_text_splitting: True
5253
length_penalty: 1.0
5354
repetition_penalty: 10

0 commit comments

Comments
 (0)