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

Add language support to Cartesia synthesizer #703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cyrilS-dev
Copy link

Description

This PR addresses an error introduced by PR #700 which added timestamps to the Cartesia synthesizer. The previous change resulted in an error when generating audio due to a missing language specification. This PR adds proper language support to the Cartesia synthesizer, resolving the error and allowing users to specify the language for text-to-speech synthesis.

Issue Fixed

Error message resolved: "Failed to generate audio: Error generating audio: error processing TTS request: Language must be specified for timestamps."

Changes

  • Added language attribute to CartesiaSynthesizerConfig
  • Updated CartesiaSynthesizer to use the specified language
  • Modified the create_speech_uncached method to include language in the Cartesia API call

Testing

  • Tested with French language setting :
synthesizer=CartesiaSynthesizer(
            synthesizer_config=CartesiaSynthesizerConfig.from_output_device(
                output_device=output_device,
                model_id = "sonic-multilingual",
                voice_id = "65b25c5d-ff07-4687-a04c-da2f43ef6fa9",
                language="fr",
            )
        ),
  • Verified that the Cartesia API correctly receives and processes the language parameter

@chongzluong
Copy link
Contributor

Apologies, appreciate the catch here!

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