package Ġcom . ste ven pop ov ich . talk to that . speech recognition Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . speech . Recognizer Intent Ċ import Ġandroid . speech . Speech Recognizer Ċ import Ġcom . ste ven pop ov ich . talk to that . Main Dependency Module Ċ Ċ type alias ĠSpeech Result Business Logic Ġ= Ġ( results : ĠBundle ?) Ġ-> ĠUnit Ċ type alias ĠSpeech Recognizer Restart Logic Ġ= Ġ( speech Recognition Listener : ĠContinuous Speech Recognition Listener ) Ġ-> ĠUnit Ċ Ċ class ĠContinuous Speech Recognizer ( ĊĠĠĠ Ġprivate Ġval Ġspeech Recognizer : ĠSpeech Recognizer Ġ= ĠMain Dependency Module . speech Recognizer Ċ ) Ġ{ ĊĠĠĠ Ġfun Ġstart Listening ( intent : ĠIntent , Ġrecognition Listener : ĠContinuous Speech Recognition Listener ) Ġ{ ĊĠĠĠĠĠĠĠ Ġspeech Recognizer . destroy () ĊĠĠĠĠĠĠĠ Ġspeech Recognizer . set Recognition Listener ( recognition Listener ) ĊĊĠĠĠĠĠĠĠ Ġintent . action Ġ= ĠRe cognizer Intent . ACTION _ RE CO GN IZE _ SPE E CH ĊĠĠĠĠĠĠĠ Ġintent . putExtra ( Recognizer Intent . EXTRA _ PAR TIAL _ RESULTS , Ġtrue ) ĊĊĠĠĠĠĠĠĠ Ġspeech Recognizer . start Listening ( intent ) ĊĠĠĠ Ġ} Ċ } Ċ