Package-level declarations
Types
Link copied to clipboard
interface SecureStore
Encrypted-at-rest key->String store for secrets (API keys, client secrets).
Functions
Link copied to clipboard
fun openAndroidMicrophone(options: MicrophoneOptions, audioSource: Int, sampleRateHz: Int = options.preferredSampleRateHz ?: 16_000, channelCount: Int = options.preferredChannelCount ?: 1, unsupportedOpusMessage: String = "Android microphone: OPUS not supported", unsupportedChannelMessage: (Int) -> String = { "Android microphone: channelCount=$it" }, minBufferErrorMessage: (Int) -> String = { "AudioRecord.getMinBufferSize failed: $it" }, uninitializedMessage: String = "AudioRecord not initialized", sharedFlowExtraBufferCapacity: Int = 64, sharedFlowOverflow: BufferOverflow = BufferOverflow.SUSPEND, breakOnNegativeRead: Boolean = true, beforeStart: () -> Unit = {}, beforeStop: () -> Unit = {}, afterStop: () -> Unit = {}): Result<MicrophoneSession>
Link copied to clipboard
suspend fun playEncodedViaMediaPlayer(data: ByteArray, usageAttributes: Int, interrupt: Boolean, tempFileFactory: () -> File, legacyStreamType: Int? = null, preferredDevice: AudioDeviceInfo? = null, currentPlayer: () -> MediaPlayer?? = null, setCurrentPlayer: (MediaPlayer?) -> Unit? = null, errorMessage: (what: Int, extra: Int) -> String = { what, extra ->
"MediaPlayer error: what=$what extra=$extra"
}): Result<Unit>
Link copied to clipboard
suspend fun playPcmViaAudioTrack(data: ByteArray, format: PcmFormat, usageAttributes: Int, interrupt: Boolean, legacyStreamType: Int? = null, preferredDevice: AudioDeviceInfo? = null, unsupportedOpusMessage: String = "playAudio: OPUS not supported", uninitializedMessage: String = "AudioTrack not initialized", bufferSizeInBytes: (Int) -> Int = { it.coerceAtLeast(1024) }, fallbackToLegacyStream: Boolean = false, checkInitialized: Boolean = true): Result<Unit>
Link copied to clipboard