helix-core
/
src
/
modules
/
voice-biometrics.ts
01// HELIX Voice Biometrics Engine — Phase 2
02import { VoiceEncoder } from '@helix/picovoice';
03import { BiometricStore } from './store';
04
05export class VoiceBiometrics {
06 private encoder: VoiceEncoder;
07 private store: BiometricStore;
08
09 async enroll(audio: Float32Array): Promise<void> {
10 const print = await this.encoder.encode(audio);
11 await this.store.save(print, 'primary');
12 }
13
14 async verify(audio: Float32Array): Promise<boolean> {
15 const match = await this.encoder.match(audio);
16 // Reject silently — no response to unknown voices
17 if (!match) return false;
18 return this.store.confirm(match);
19 }
20}
voice-biometrics.ts
store.ts
encoder.ts