Skip to content

Minimal example of using cartesia tts to produce text-to-speech audio and play it using the flutter_soloud Flutter plugin.

Notifications You must be signed in to change notification settings

alnitak/cartesia_tts

Repository files navigation

Cartesia TTS using Flutter

Minimal example of using cartesia tts to produce text-to-speech audio and play it using the flutter_soloud Flutter plugin.

The workflow:

  • Authenticate with the Cartesia API
  • Setup a text-to-speech message to request PCM audio to Cartesia and a corresponding flutter_soloud stream with the same format
  • Request text-to-speech audio
  • Play the audio at first chunk received

Note: replace the cartesiaApiKey with your Cartesia API key in main.dart. Note2: no stream buffering management. If the data comes slower than the rate of the flutter_soloud stream, the audio could have gaps.

About

Minimal example of using cartesia tts to produce text-to-speech audio and play it using the flutter_soloud Flutter plugin.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published