Streaming Audio in FLAC or AMR_WB to the Google Speech API : <p>I need to run the google speech api in somewhat low bandwidth environments.</p>

<p>Based on reading about best practices, it seems my best bet is to use the AMR_WB format.</p>

<p>However, the following code produces no exceptions, and I get no responses in the <code>onError(t: Throwable)</code> method, but the API is not returning any values at all in the <code>onNext(value: StreamingRecognizeResponse)</code> method.</p>

<p>If I change the format in <code>.setEncoding()</code> from <code>FLAC</code> or <code>AMR_WB</code> back to <code>LINEAR16</code> everything works fine.</p>

<p>AudioEmitter.kt</p>

<pre><code>fun start(
            encoding: Int = AudioFormat.ENCODING_PCM_16BIT,
            channel: Int = AudioFormat.CHANNEL_IN_MONO,
            sampleRate: Int = 16000,
            subscriber: (ByteString) -&gt; Unit
    )
</code></pre>

<p>MainActivity.kt</p>

<pre><code>builder.streamingConfig = StreamingRecognitionConfig.newBuilder()
        .setConfig(RecognitionConfig.newBuilder()
                .setLanguageCode("en-US")
                .setEncoding(RecognitionConfig.AudioEncoding.AMR_WB)
                .setSampleRateHertz(16000)
                .build())
        .setInterimResults(true)
        .setSingleUtterance(false)
        .build()
</code></pre>
