elevenlabs 1.0.1 elevenlabs: ^1.0.1 copied to clipboard
A simple wrapper for accessing ElevenLabs's Text-To-Spech API and converting the results to MP3 files.
ElevenLabsTTS #
A simple wrapper for ElevenLabs's Text-To-Speech API.
Usage #
- add the package as a dependency to your
pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
elevenlabs: ^1.0.0
- Initialize ElevenLabsTTS:
ElevenLabsTTS elevenlabs = ElevenLabsTTS(apiKey: 'API_KEY');
VoiceId's can be found here: https://api.elevenlabs.io/v1/voices
- Convert your text to a File object (api key required):
elevenlabs.textToSpeech(
text: text,
voiceId: "ErXwobaYiN019PkySvjV",
stability: 0.01,
similarityBoost: 0.6,
);