Skip to content

Commit b665b2f

Browse files
fix: remove tts language code and voice name hardcoding
1 parent d952cc9 commit b665b2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/nmt/s2s_mic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def parse_args() -> argparse.Namespace:
2121
parser.add_argument("--list-output-devices", action="store_true", help="List input audio device indices.")
2222
parser.add_argument("--output-device", type=int, help="Output device to use.")
2323
parser.add_argument("--target-language-code", default="en-US", help="Language code of the output language.")
24+
parser.add_argument("--tts-voice-name", default="English-US.Female-1", help="Voice name of the TTS model")
2425
parser.add_argument(
2526
"--play-audio",
2627
action="store_true",
@@ -99,8 +100,8 @@ def main() -> None:
99100
tts_config = riva.client.SynthesizeSpeechConfig(
100101
encoding=1,
101102
sample_rate_hz=44100,
102-
voice_name="English-US.Female-1",
103-
language_code="en-US",
103+
voice_name=args.tts_voice_name,
104+
language_code=args.target_language_code,
104105
),
105106
)
106107

0 commit comments

Comments
 (0)