Skip to content
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

Merged
merged 8 commits into from
Aug 7, 2023

Conversation

divst3r
Copy link
Contributor

@divst3r divst3r commented Aug 4, 2023

No description provided.

@divst3r divst3r requested a review from ajar98 August 5, 2023 00:02
@@ -88,12 +92,13 @@ async def main():
print("Message sent: ", message_sent)
except KeyboardInterrupt:
print("Interrupted, exiting")
await synthesizer.tear_down()
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print

vocode/streaming/synthesizer/play_ht_synthesizer.py Outdated Show resolved Hide resolved
speed: Optional[str] = None
preset: Optional[str] = None
quality: Optional[str] = None
quality: Optional[str] = PLAYHT_DEFAULT_QUALITY
Copy link
Contributor

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(
Copy link
Contributor

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!

@ajar98 ajar98 merged commit 6f3baa1 into main Aug 7, 2023
4 checks passed
@divst3r divst3r deleted the divst3r/vocodoe-python-plat-ht-synthesizer branch August 7, 2023 20:00
m5a0r7 pushed a commit to m5a0r7/vocode-python that referenced this pull request Oct 19, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants