fix(asr): [PKG-ASR-08] keep captured fallback off the audible route

This commit is contained in:
Harvey Zhao committed 2026-09-13 15:40:27 +08:00
1 parent 3e3bed2b93
commit 6d7b9292f8
19 files changed
+5104 -25

No files matched your search

+5 -4
View File
@@ -33,8 +33,8 @@ export function asrAudioEnvironment(implementation, option = {}, capabilities =
let nextUrl = 0
let captures = 0
function node(kind) {
const value = {
function node(kind, value = {}) {
Object.assign(value, {
kind,
connections: [],
disconnects: 0,
@@ -43,7 +43,7 @@ export function asrAudioEnvironment(implementation, option = {}, capabilities =
this.disconnects++
this.connections = []
},
}
})
nodes.push(value)
return value
}
@@ -105,7 +105,8 @@ export function asrAudioEnvironment(implementation, option = {}, capabilities =
assert.ok(contexts.includes(context))
assert.equal(context.state, 'running')
assert.equal(name, 'recorder-processor')
Object.assign(this, node('recorder'), { port: { onmessage: null } })
node('recorder', this)
this.port = { onmessage: null }
recorders.push(this)
}
}