@@ -155,6 +155,10 @@ internal constructor(
155155 * function call. The [FunctionResponsePart] that the callback function returns will be
156156 * automatically sent to the model.
157157 *
158+ * @param transcriptHandler A callback function that is invoked whenever the model receives a
159+ * transcript. The first [Transcription] object is the input transcription, and the second is the
160+ * output transcription.
161+ *
158162 * @param enableInterruptions If enabled, allows the user to speak over or interrupt the model's
159163 * ongoing reply.
160164 *
@@ -250,6 +254,8 @@ internal constructor(
250254 )
251255 }
252256 ?.let { emit(it.toPublic()) }
257+ // delay uses a different scheduler in the backend, so it's "stickier" in its
258+ // enforcement when compared to yield.
253259 delay(0 )
254260 }
255261 }
@@ -427,6 +433,8 @@ internal constructor(
427433 ?.accumulateUntil(MIN_BUFFER_SIZE )
428434 ?.onEach {
429435 sendAudioRealtime(InlineData (it, " audio/pcm" ))
436+ // delay uses a different scheduler in the backend, so it's "stickier" in its enforcement
437+ // when compared to yield.
430438 delay(0 )
431439 }
432440 ?.catch { throw FirebaseAIException .from(it) }
@@ -515,6 +523,8 @@ internal constructor(
515523 if (! enableInterruptions) {
516524 audioHelper?.resumeRecording()
517525 }
526+ // delay uses a different scheduler in the backend, so it's "stickier" in its enforcement
527+ // when compared to yield.
518528 delay(0 )
519529 } else {
520530 /* *
0 commit comments