AudioRepository

interface AudioRepository

Defines the contract for all audio operations, such as receiving audio from the backend and streaming microphone data.

Properties

Link copied to clipboard
abstract val incomingAudio: Flow<ByteArray>

A flow that emits incoming audio data from the backend.

Functions

Link copied to clipboard
abstract suspend fun connect()

Establishes a connection to the backend (e.g., a WebSocket).

Link copied to clipboard
abstract suspend fun disconnect()

Closes the connection and releases all networking resources.

Link copied to clipboard
abstract suspend fun startRecordingAndSending()

Begins capturing microphone audio and streaming it to the backend.

Link copied to clipboard
abstract suspend fun stopRecordingAndSending()

Stops the audio stream.