Skip to content

Commit

Permalink
fix: use name of synthesize voice (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobloem authored Nov 23, 2024
1 parent 48bc849 commit 3f4a1f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wyoming_microsoft_tts/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ async def handle_event(self, event: Event) -> bool:

# Join multiple lines
text = " ".join(raw_text.strip().splitlines())
voice = synthesize.voice
if voice is None: # Use default voice if not specified

if synthesize.voice is None: # Use default voice if not specified
voice = self.cli_args.voice
else:
voice = synthesize.voice.name

if self.cli_args.auto_punctuation and text:
# Add automatic punctuation (important for some voices)
Expand Down

0 comments on commit 3f4a1f8

Please sign in to comment.