Skip to content

[Feat] Deepgram TTS #191

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

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edenai_apis/apis/deepgram/deepgram_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def audio__text_to_speech(
if audio_format:
base_url += f"&container={audio_format}"

if sampling_rate or sampling_rate != 0:
if sampling_rate and sampling_rate != 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry to be samet :(
we can actually than just write:

if sampling_rate:

Copy link
Contributor Author

@Daggx Daggx Apr 29, 2024

Choose a reason for hiding this comment

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

0 is not accepted and it will return an error (if the user send 0 or None than it should ignore the sampling_rate)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, with the condition if sampling_rate he will automatically not enter the if condition (0 is considered as False also)

base_url += f"&sample_rate={sampling_rate}"

headers = {
Expand Down
Loading