Skip to content

Commit

Permalink
0.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
matatonic committed Jul 1, 2024
1 parent 02a6c7e commit fdd443b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ If you find a better voice match for `tts-1` or `tts-1-hd`, please let me know s

## Recent Changes

Version 0.17.1, 2024-07-01

* fix ROCm (add langdetect to requirements-rocm.txt)
* Fix zh-cn for xtts

Version 0.17.0, 2024-07-01

* Automatic language detection, thanks [@RodolfoCastanheira](https://github.com/RodolfoCastanheira)
Expand Down
4 changes: 2 additions & 2 deletions add_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

parser.add_argument('sample', action='store', help="Set the wav sample file")
parser.add_argument('-n', '--name', action='store', help="Set the name for the voice (by default will use the WAV file name)")
parser.add_argument('-l', '--language', action='store', default="en", help="Set the language for the voice",
choices=['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'ja', 'hu', 'ko'])
parser.add_argument('-l', '--language', action='store', default="auto", help="Set the language for the voice",
choices=['auto', 'en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'ja', 'hu', 'ko', 'hi'])
parser.add_argument('--openai-model', action='store', default="tts-1-hd", help="Set the openai model for the voice")
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)")
parser.add_argument('--model-path', action='store', default=None, help="Set the path for a custom xtts model")
Expand Down
1 change: 1 addition & 0 deletions requirements-rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ uvicorn
loguru
piper-tts
coqui-tts
langdetect
# Creating an environment where deepspeed works is complex, for now it will be disabled by default.
#deepspeed
torch; --index-url https://download.pytorch.org/whl/rocm5.7; sys_platform == "linux"
Expand Down
6 changes: 5 additions & 1 deletion speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ async def generate_speech(request: GenerateSpeechRequest):
hf_generate_kwargs['enable_text_splitting'] = hf_generate_kwargs.get('enable_text_splitting', True) # change the default to true

if hf_generate_kwargs['enable_text_splitting']:
all_text = split_sentence(input_text, language, xtts.xtts.tokenizer.char_limits[language])
if language == 'zh-cn':
split_lang = 'zh'
else:
split_lang = language
all_text = split_sentence(input_text, split_lang, xtts.xtts.tokenizer.char_limits[split_lang])
else:
all_text = [input_text]

Expand Down
3 changes: 2 additions & 1 deletion voice_to_speaker.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ tts-1-hd:
model: xtts
speaker: voices/shimmer.wav
me:
model: xtts_v2.0.2 # you can specify different xtts version
model: xtts_v2.0.2 # you can specify an older xtts version
speaker: voices/me.wav # this could be you
language: auto
enable_text_splitting: True
length_penalty: 1.0
repetition_penalty: 10
Expand Down

0 comments on commit fdd443b

Please sign in to comment.