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

switch to from_twilio_input_device and from_vonage_input_device #459

Closed
SaadAJ opened this issue Dec 14, 2023 · 2 comments
Closed

switch to from_twilio_input_device and from_vonage_input_device #459

SaadAJ opened this issue Dec 14, 2023 · 2 comments

Comments

@SaadAJ
Copy link

SaadAJ commented Dec 14, 2023

TODO(EPD-186): switch to from_twilio_input_device and from_vonage_input_device

Currently, from_input_device in transcriber.py, and from_output_device in synthesizer.py, are set to the default audio format parameters like DEFAULT_SAMPLING_RATE, those correspond to Twilio's audio properties, and are not compatible with Vonage which causes Vonage to break.

A fix is already mentioned as a comment, to switch from a single function from_input_device to unique functions for each telephony provider, from_twilio_input_device and from_vonage_input_device.

@arpagon
Copy link
Contributor

arpagon commented Feb 16, 2024

As @SaadAJ points out, To address the issue, you need to modify the transcriber.py

https://github.com/vocodedev/vocode-python/blob/6f7e9cd90710c3cc7f927de4315b6e97906e318d/vocode/streaming/models/transcriber.py#L80
https://github.com/vocodedev/vocode-python/blob/6f7e9cd90710c3cc7f927de4315b6e97906e318d/vocode/streaming/models/synthesizer.py#L58

Change VONAGE_SAMPLING_RATE, VONAGE_AUDIO_ENCODING, and VONAGE_CHUNK_SIZE

Remember to import the VONAGE_SAMPLING_RATE, VONAGE_AUDIO_ENCODING, and VONAGE_CHUNK_SIZE constants at the top of your file.

@arpagon
Copy link
Contributor

arpagon commented Feb 16, 2024

Closed as duplicate in favor of #501

@arpagon arpagon closed this as completed Feb 16, 2024
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

No branches or pull requests

2 participants