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

Use raw format for AzureTTSService output #519

Open
amacapri opened this issue Sep 27, 2024 · 0 comments
Open

Use raw format for AzureTTSService output #519

amacapri opened this issue Sep 27, 2024 · 0 comments

Comments

@amacapri
Copy link

amacapri commented Sep 27, 2024

In the AzureTTSService class, there is a comment that states:

# Azure always sends a 44-byte header. Strip it off.
yield AudioRawFrame(
        audio=result.audio_data[44:],
        sample_rate=self._sample_rate,
        num_channels=1,
    )

I believe this behavior occurs because the default speech_synthesis_output_format is being used, which is most likely in WAV format. Instead, you should consider using one of the "raw" formats, such as SpeechSynthesisOutputFormat.Raw16Khz16BitMonoPcm.

@amacapri amacapri changed the title Use raw format for AzureTTS output Use raw format for AzureTTSService output Sep 27, 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

1 participant