mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-07 14:22:38 +02:00
minor optimizations for voice input
This commit is contained in:
parent
ce2e64c908
commit
3a0bb3ed3b
1 changed files with 1 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ export function useVoiceMode() {
|
||||||
const audioCtx = new AudioContext({ sampleRate: 16000 });
|
const audioCtx = new AudioContext({ sampleRate: 16000 });
|
||||||
audioCtxRef.current = audioCtx;
|
audioCtxRef.current = audioCtx;
|
||||||
const source = audioCtx.createMediaStreamSource(stream);
|
const source = audioCtx.createMediaStreamSource(stream);
|
||||||
const processor = audioCtx.createScriptProcessor(4096, 1, 1);
|
const processor = audioCtx.createScriptProcessor(2048, 1, 1);
|
||||||
processorRef.current = processor;
|
processorRef.current = processor;
|
||||||
|
|
||||||
processor.onaudioprocess = (e) => {
|
processor.onaudioprocess = (e) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue