Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alnitak/cartesia_tts

Minimal example of using cartesia tts to produce text-to-speech audio and play it using the flutter_soloud Flutter plugin.
https://github.com/alnitak/cartesia_tts

ai cartesia flutter tts

Last synced: 23 days ago
JSON representation

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

Awesome Lists containing this project

README

        

## Cartesia TTS using Flutter

Minimal example of using [cartesia tts](https://www.cartesia.ai/) to produce text-to-speech audio and play it using the [flutter_soloud](https://github.com/alnitak/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.