Modification of the structure

This commit is contained in:
2026-09-22 12:04:35 +03:30
parent 41f0025883
commit 75a73559b5
3 changed files with 42 additions and 19 deletions
@@ -244,7 +244,11 @@ async function start() {
stream = null;
return;
}
ctx = new Ctor();
try {
ctx = new Ctor({ sampleRate: 16000 });
} catch {
ctx = new Ctor();
}
await ctx.resume();
sampleRate = ctx.sampleRate || 16000;
source = ctx.createMediaStreamSource(stream);