TTSRequest class
Text-to-Speech request configuration
Constructors
-
TTSRequest.new({required String text, String? voice, String? model, String? format, String? quality, int? sampleRate, double? stability, double? similarityBoost, double? style, bool? useSpeakerBoost, double? speed, AudioProcessingMode processingMode = AudioProcessingMode.batch, bool includeTimestamps = false, TimestampGranularity timestampGranularity = TimestampGranularity.word, TextNormalization textNormalization = TextNormalization.auto, String? languageCode, String? instructions, String? previousText, String? nextText, List<
String> ? previousRequestIds, List<String> ? nextRequestIds, int? seed, bool enableLogging = true, int? optimizeStreamingLatency}) -
const
-
TTSRequest.fromJson(Map<
String, dynamic> json) -
factory
Properties
- enableLogging → bool
-
Enable logging (ElevenLabs specific)
final
- format → String?
-
Audio format (mp3, wav, ogg, etc.)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeTimestamps → bool
-
Whether to include timing information
final
- instructions → String?
-
Instructions for voice control (OpenAI specific)
final
- languageCode → String?
-
Language code for TTS (ISO 639-1)
final
- model → String?
-
Model to use for TTS
final
-
nextRequestIds
→ List<
String> ? -
Next request IDs for continuity (ElevenLabs specific)
final
- nextText → String?
-
Next text for continuity (ElevenLabs specific)
final
- optimizeStreamingLatency → int?
-
Optimize streaming latency (ElevenLabs specific)
final
-
previousRequestIds
→ List<
String> ? -
Previous request IDs for continuity (ElevenLabs specific)
final
- previousText → String?
-
Previous text for continuity (ElevenLabs specific)
final
- processingMode → AudioProcessingMode
-
Processing mode (batch, streaming, realtime)
final
- quality → String?
-
Audio quality/bitrate
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → int?
-
Sample rate (e.g., 44100, 22050)
final
- seed → int?
-
Seed for deterministic generation
final
- similarityBoost → double?
-
Similarity boost (0.0-1.0, provider-specific)
final
- speed → double?
-
Speed/rate of speech (provider-specific)
final
- stability → double?
-
Voice stability (0.0-1.0, provider-specific)
final
- style → double?
-
Style parameter (0.0-1.0, provider-specific)
final
- text → String
-
Text to convert to speech
final
- textNormalization → TextNormalization
-
Text normalization mode
final
- timestampGranularity → TimestampGranularity
-
Timestamp granularity (word, character, segment)
final
- useSpeakerBoost → bool?
-
Use speaker boost (provider-specific)
final
- voice → String?
-
Voice ID or name
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited