STTRequest class

Speech-to-Text request configuration

Constructors

STTRequest({List<int>? audioData, String? filePath, String? cloudStorageUrl, String? model, String? language, String? format, bool includeWordTiming = false, bool includeConfidence = false, double? temperature, TimestampGranularity timestampGranularity = TimestampGranularity.word, bool diarize = false, int? numSpeakers, bool tagAudioEvents = true, bool webhook = false, String? prompt, String? responseFormat, bool enableLogging = true})
const
STTRequest.fromAudio(List<int> audioData, {String? model, String? language, String? format, bool includeWordTiming = false, bool includeConfidence = false, double? temperature, TimestampGranularity timestampGranularity = TimestampGranularity.word, bool diarize = false, int? numSpeakers, bool tagAudioEvents = true, bool webhook = false, String? prompt, String? responseFormat, bool enableLogging = true})
Create STT request from audio data
factory
STTRequest.fromCloudUrl(String cloudStorageUrl, {String? model, String? language, String? format, bool includeWordTiming = false, bool includeConfidence = false, double? temperature, TimestampGranularity timestampGranularity = TimestampGranularity.word, bool diarize = false, int? numSpeakers, bool tagAudioEvents = true, bool webhook = false, String? prompt, String? responseFormat, bool enableLogging = true})
Create STT request from cloud storage URL (ElevenLabs specific)
factory
STTRequest.fromFile(String filePath, {String? model, String? language, String? format, bool includeWordTiming = false, bool includeConfidence = false, double? temperature, TimestampGranularity timestampGranularity = TimestampGranularity.word, bool diarize = false, int? numSpeakers, bool tagAudioEvents = true, bool webhook = false, String? prompt, String? responseFormat, bool enableLogging = true})
Create STT request from file
factory
STTRequest.fromJson(Map<String, dynamic> json)
factory

Properties

audioData → List<int>?
Audio data as bytes (for direct audio input)
final
cloudStorageUrl → String?
Cloud storage URL (ElevenLabs specific)
final
diarize → bool
Whether to enable speaker diarization (ElevenLabs specific)
final
enableLogging → bool
Enable logging (ElevenLabs specific)
final
filePath → String?
File path (for file input)
final
format → String?
Audio format hint
final
hashCode → int
The hash code for this object.
no setterinherited
includeConfidence → bool
Whether to include confidence scores
final
includeWordTiming → bool
Whether to include word-level timing
final
language → String?
Language code (e.g., 'en-US')
final
model → String?
Model to use for STT
final
numSpeakers → int?
Maximum number of speakers (ElevenLabs specific)
final
prompt → String?
Prompt to guide transcription style (OpenAI specific)
final
responseFormat → String?
Response format (json, text, srt, verbose_json, vtt)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tagAudioEvents → bool
Whether to tag audio events like (laughter) (ElevenLabs specific)
final
temperature → double?
Temperature for transcription (provider-specific)
final
timestampGranularity → TimestampGranularity
Timestamp granularity (word, character, segment)
final
webhook → bool
Whether to use webhook for async processing (ElevenLabs specific)
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