AudioRecordSourceFactory

class AudioRecordSourceFactory(    val audioSource: Int = MediaRecorder.AudioSource.VOICE_RECOGNITION,     val sampleRate: Int = 16000,     val channelConfig: Int = android.media.AudioFormat.CHANNEL_IN_FRONT,     val audioFormat: Int = android.media.AudioFormat.ENCODING_PCM_16BIT,     val bufferSize: Int = sampleRate * 2 * 10) : AudioSourceFactory

Default implementation of AudioSourceFactory for android.media.AudioRecord

Constructors

Link copied to clipboard
fun AudioRecordSourceFactory(    audioSource: Int = MediaRecorder.AudioSource.VOICE_RECOGNITION,     sampleRate: Int = 16000,     channelConfig: Int = android.media.AudioFormat.CHANNEL_IN_FRONT,     audioFormat: Int = android.media.AudioFormat.ENCODING_PCM_16BIT,     bufferSize: Int = sampleRate * 2 * 10)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun create(): AudioSource

Create a AudioSource

Link copied to clipboard
open override fun getFormat(): AudioFormat

Return an audio format of audio source which will be created from create

Properties

Link copied to clipboard
val audioFormat: Int
Link copied to clipboard
val audioSource: Int
Link copied to clipboard
val bufferSize: Int
Link copied to clipboard
val channelConfig: Int
Link copied to clipboard
val sampleRate: Int = 16000