useVoiceEnrollment (composables/use-voice-enrollment.ts)

airi · packages/stage-ui/src/composables/use-voice-enrollment.ts · typescript · MIT
voice

Vue composable that handles voice enrollment, recording, and voiceprint storage.

// Source: https://github.com/moeru-ai/airi | License: MIT | Copyright 2024-PRESENT Neko Ayaka
// Provided via justclaw.it.com; keep this notice with the code.
import type { VoiceEnrollmentSnapshot } from '../libs/voice/voice-enrollment'

import { computed, onScopeDispose, shallowRef } from 'vue'

import { holdCaptureLease } from '../libs/voice/capture-lease'
import { computeVoiceprint } from '../libs/voice/speaker-model'
import { VoiceEnrollment } from '../libs/voice/voice-enrollment'
import { useSettingsAudioDevice } from '../stores/settings/audio-device'
import { useVoiceprintStore } from '../stores/voiceprint'
import { SileroVad } from '../workers/vad/silero-vad'

/** `idle` means that no enrollment ran in this scope. A settled enrollment keeps its last state until the next `begin`. */

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key