LiveTranscriptionSocket class

Class for managing WebSocket connection for real-time speech recognition

Constructors

LiveTranscriptionSocket({required String url, void onMessage(dynamic)?, void onDone()?, Function? onError})
Creates a new instance of LiveTranscriptionSocket

Properties

hashCode int
The hash code for this object.
no setterinherited
isConnected bool
Checks if connection is established
no setter
onDone → void Function()?
Handler for connection closure
final
onError Function?
Error handler
final
onMessage → void Function(dynamic)?
Handler for messages from server
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
URL for WebSocket connection
final

Methods

close() → void
Closes WebSocket connection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendAudioData(List<int> audioData) → void
Sends audio data to the server
sendBase64AudioData(List<int> audioData) → void
Sends audio data to the server in base64 format
sendMessage(Map<String, dynamic> message) → void
Sends arbitrary message
sendStopRecording() → void
Sends a message about stopping recording
toString() String
A string representation of this object.
inherited

Operators

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