-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the play ht synthesizer in vocode-python #341
Conversation
@@ -88,12 +92,13 @@ async def main(): | |||
print("Message sent: ", message_sent) | |||
except KeyboardInterrupt: | |||
print("Interrupted, exiting") | |||
await synthesizer.tear_down() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove changes from this file (already in main)
quality: Optional[str] = PLAYHT_DEFAULT_QUALITY | ||
output_format: Optional[str] = PLAYHT_DEFAULT_OUTPUT_FORMAT | ||
speed: Optional[int] = PLAYHT_DEFAULT_SPEED | ||
sampling_rate: int = PLAYHT_DEFAULT_RATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't override sampling_rate
- this comes from the super class SynthesizerConfig
preset: Optional[str] = None | ||
quality: Optional[str] = None | ||
quality: Optional[str] = PLAYHT_DEFAULT_QUALITY | ||
output_format: Optional[str] = PLAYHT_DEFAULT_OUTPUT_FORMAT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have support for other output formats in the synthesizer? it always needs to output wav in the end (that's why we have that AudioSegment.from_mp3
call
): | ||
print(api_key, user_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print
speed: Optional[str] = None | ||
preset: Optional[str] = None | ||
quality: Optional[str] = None | ||
quality: Optional[str] = PLAYHT_DEFAULT_QUALITY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep these as nones (use the Play.ht defaults)
io.BytesIO(read_response) # type: ignore | ||
# Run the conversion from MP3 in a separate thread | ||
loop = asyncio.get_event_loop() | ||
output_bytes_io = await loop.run_in_executor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't need to be in a thread anymore!
* Updated the play ht synthesizer implementation on vocode-python * fix some imports * fix mypy type error * resolve comment and organize imports * minor fixes * remove quality parameter form play ht synthesizer * resolve comments --------- Co-authored-by: Divi kumar <[email protected]> Co-authored-by: Ajay Raj <[email protected]>
No description provided.