fix(asr): keep recordings when streaming recognition fails or stalls
- Keep recording after a streaming ASR error and retry the captured PCM through batch ASR before reporting a failure. - Treat an expired ASR wait as a stall so batch fallback still runs. - Prime the managed Volcengine stream on mic touch and adopt it only while fresh and open. - Auto-scroll the live transcript to the newest recognized text.
This commit is contained in:
@@ -51,6 +51,13 @@ public protocol CloudASRStreamingSession: Sendable {
|
||||
/// Signal end-of-audio and wait for the polish-ready final transcript.
|
||||
func finish() async throws -> String
|
||||
func cancel()
|
||||
/// False once the session has failed, closed, or been cancelled, so a
|
||||
/// pre-opened session is not adopted after its transport already died.
|
||||
var acceptsAudio: Bool { get }
|
||||
}
|
||||
|
||||
public extension CloudASRStreamingSession {
|
||||
var acceptsAudio: Bool { true }
|
||||
}
|
||||
|
||||
/// Providers that can open an utterance-level streaming session.
|
||||
|
||||
Reference in New Issue
Block a user