Skip to content

Instantly share code, notes, and snippets.

@pengj
Last active February 16, 2021 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pengj/6a679f335fd0b54e9bfed202171e8c80 to your computer and use it in GitHub Desktop.
Save pengj/6a679f335fd0b54e9bfed202171e8c80 to your computer and use it in GitHub Desktop.
Direction Provider and internal class
interface DirectionProvider {
fun start()
fun stop()
fun destroy()
}
internal class HuaweiVoiceProvider(
private val context: Context,
private val voiceDirectionExtractor: VoiceDirectionExtractor,
private val onDirectionListener: (direction: Direction) -> Unit,
) : MLAsrListener, DirectionProvider
internal class VoiceProvider(
context: Context,
private val voiceDirectionExtractor: VoiceDirectionExtractor,
private val onDirectionListener: (direction: Direction) -> Unit
) : RecognitionListener, DirectionProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment