forked from Blendman974/faceclaw
Optimize APK size
Removes unused keyword-spotting model. Makes on-device voice model a runtime download rather than bundling it. Removes native-code library versions for 32-bit and x86_64 processors.
This commit is contained in:
1 parent
69ec828cb7
commit
2b71eddab5
27 files changed
+313
-1283
No files matched your search
@@ -45,7 +45,6 @@ export type RawPcmListener = (pcm: Uint8Array) => void;
|
||||
|
||||
export class FaceclawVoiceControlBridge {
|
||||
private readonly statusListeners = new Set<(state: VoiceControlState) => void>();
|
||||
private readonly wakeWordListeners = new Set<(keyword: string) => void>();
|
||||
private readonly transcriptListeners = new Set<(event: VoiceTranscriptEvent) => void>();
|
||||
private readonly speechEndListeners = new Set<() => void>();
|
||||
private controller: any | null = null;
|
||||
@@ -72,11 +71,6 @@ export class FaceclawVoiceControlBridge {
|
||||
return () => this.statusListeners.delete(listener);
|
||||
}
|
||||
|
||||
onWakeWord(listener: (keyword: string) => void): () => void {
|
||||
this.wakeWordListeners.add(listener);
|
||||
return () => this.wakeWordListeners.delete(listener);
|
||||
}
|
||||
|
||||
onTranscript(listener: (event: VoiceTranscriptEvent) => void): () => void {
|
||||
this.transcriptListeners.add(listener);
|
||||
return () => this.transcriptListeners.delete(listener);
|
||||
@@ -266,11 +260,6 @@ export class FaceclawVoiceControlBridge {
|
||||
if (this.rawActive) return;
|
||||
this.setStatus(String(status));
|
||||
},
|
||||
onWakeWord: (keyword: string) => {
|
||||
for (const listener of this.wakeWordListeners) {
|
||||
listener(String(keyword));
|
||||
}
|
||||
},
|
||||
onTranscript: (text: string, isFinal: boolean) => {
|
||||
this.emitTranscript(String(text), Boolean(isFinal));
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user