feat: use correct lang_code
This commit is contained in:
parent
f22a5191a4
commit
242e6e0a05
1 changed files with 5 additions and 3 deletions
8
tts.py
8
tts.py
|
@ -131,14 +131,13 @@ def main():
|
||||||
# Generate audio
|
# Generate audio
|
||||||
with yaspin() as spinner:
|
with yaspin() as spinner:
|
||||||
spinner.text = spinner_text
|
spinner.text = spinner_text
|
||||||
|
|
||||||
args=parse_args()
|
args=parse_args()
|
||||||
|
|
||||||
if not args.verbose:
|
if not args.verbose:
|
||||||
# Disable all warnings
|
# Disable all warnings
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
pipeline = KPipeline(lang_code='a', device=args.device, repo_id='hexgrad/Kokoro-82M')
|
|
||||||
if args.voice in voices:
|
if args.voice in voices:
|
||||||
voice=voices[args.voice]
|
voice=voices[args.voice]
|
||||||
else:
|
else:
|
||||||
|
@ -168,6 +167,9 @@ def main():
|
||||||
name = name.replace("\\", "_")
|
name = name.replace("\\", "_")
|
||||||
name = name.replace("/", "_")
|
name = name.replace("/", "_")
|
||||||
|
|
||||||
|
lang_code = voice[0]
|
||||||
|
pipeline = KPipeline(lang_code=lang_code, device=args.device, repo_id='hexgrad/Kokoro-82M')
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Split patterns:
|
Split patterns:
|
||||||
- only multiple consecutive new line (to handle wrapped statements)
|
- only multiple consecutive new line (to handle wrapped statements)
|
||||||
|
|
Loading…
Reference in a new issue