ElevenLabsProvider class

ElevenLabs Provider implementation

This is the main provider class that implements audio capabilities and delegates to specialized modules for different functionalities. ElevenLabs specializes in text-to-speech and speech-to-text services.

Implemented types

Properties

audio ElevenLabsAudio
latefinal
client ElevenLabsClient
final
config ElevenLabsConfig
final
hashCode int
The hash code for this object.
no setterinherited
info Map<String, dynamic>
Get provider information
no setter
models ElevenLabsModels
latefinal
providerName String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedFeatures Set<AudioFeature>
Get all audio features supported by this provider
no setteroverride

Methods

chat(List<ChatMessage> messages) Future<ChatResponse>
Sends a chat request to the provider with a sequence of messages.
override
chatStream(List<ChatMessage> messages, {List<Tool>? tools}) Stream<ChatStreamEvent>
Sends a streaming chat request to the provider
override
chatWithTools(List<ChatMessage> messages, List<Tool>? tools) Future<ChatResponse>
Sends a chat request to the provider with a sequence of messages and tools.
override
copyWith({String? apiKey, String? baseUrl, String? voiceId, String? model, Duration? timeout, double? stability, double? similarityBoost, double? style, bool? useSpeakerBoost}) ElevenLabsProvider
Create a new provider with updated configuration
getModels() Future<List<Map<String, dynamic>>>
Get available models
getSupportedAudioFormats() List<String>
Get supported input/output audio formats
override
getSupportedLanguages() Future<List<LanguageInfo>>
Get supported languages for transcription and translation
override
getUserInfo() Future<Map<String, dynamic>>
Get user subscription info
getVoices() Future<List<VoiceInfo>>
Get available voices for this provider
override
memoryContents() Future<List<ChatMessage>?>
Get current memory contents if provider supports memory
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
speech(String text) Future<List<int>>
Simple text-to-speech conversion (convenience method)
override
speechStream(String text) Stream<List<int>>
Simple streaming text-to-speech conversion (convenience method)
override
speechToText(STTRequest request) Future<STTResponse>
Convert speech to text with full configuration support
override
startRealtimeSession(RealtimeAudioConfig config) Future<RealtimeAudioSession>
Create and start a real-time audio session
override
summarizeHistory(List<ChatMessage> messages) Future<String>
Summarizes a conversation history into a concise 2-3 sentence summary
override
supportsCapability(Type capability) bool
Check if the provider supports a specific capability
textToSpeech(TTSRequest request) Future<TTSResponse>
Convert text to speech with full configuration support
override
textToSpeechStream(TTSRequest request) Stream<AudioStreamEvent>
Convert text to speech with streaming output
override
toString() String
A string representation of this object.
override
transcribe(List<int> audio) Future<String>
Simple audio transcription (convenience method)
override
transcribeFile(String filePath) Future<String>
Simple file transcription (convenience method)
override
translate(List<int> audio) Future<String>
Simple audio translation (convenience method)
override
translateAudio(AudioTranslationRequest request) Future<STTResponse>
Translate audio to English text
override
translateFile(String filePath) Future<String>
Simple file translation (convenience method)
override

Operators

operator ==(Object other) bool
The equality operator.
inherited