Skip to content

Voice Pipeline

🚧Coming Soon — This feature is planned but not yet implemented.

Ang mga STT at TTS providers na nakalista sa ibaba ay interface-only stubs. Ang provider interfaces ay defined pero ang implementations ay hindi pa connected sa aktwal na speech services. :::

Sinusuportahan ng Triggerfish ang speech interaction na may wake word detection, push-to-talk, at text-to-speech response sa macOS, iOS, at Android.

Architecture

Voice pipeline: Wake Word Detection → STT → Agent Processing → TTS → Voice Output

Dumadaloy ang audio sa parehong agent processing pipeline tulad ng text. Ang voice input ay tina-transcribe, pumapasok sa session bilang classified message, dumadaan sa policy hooks, at ang response ay sine-synthesize pabalik sa speech.

Mga Voice Mode

ModePaglalarawanPlatform
Voice WakeAlways-on listening para sa configurable wake wordmacOS, iOS, Android
Push-to-TalkManual activation sa pamamagitan ng button o keyboard shortcutmacOS (menu bar), iOS, Android
Talk ModeContinuous conversational speechLahat ng platforms

Mga STT Provider

Kino-convert ng speech-to-text ang boses mo sa text para ma-process ng agent.

ProviderTypeMga Tala
WhisperLocalDefault. Tumatakbo sa device, walang cloud dependency. Pinakamainam para sa privacy.
DeepgramCloudLow-latency streaming transcription.
OpenAI Whisper APICloudMataas na accuracy, nangangailangan ng API key.

Mga TTS Provider

Kino-convert ng text-to-speech ang mga response ng agent sa spoken audio.

ProviderTypeMga Tala
ElevenLabsCloudDefault. Natural-sounding voices na may voice cloning options.
OpenAI TTSCloudMataas na kalidad, maramihang voice options.
System VoicesLocalOS-native voices. Walang cloud dependency.

Provider Registry

Gumagamit ang Triggerfish ng provider registry pattern para sa parehong STT at TTS. Maaari kang mag-plug in ng anumang compatible provider sa pamamagitan ng pag-implement ng katumbas na interface:

typescript
interface SttProvider {
  transcribe(audio: Uint8Array, options?: SttOptions): Promise<string>;
}

interface TtsProvider {
  synthesize(text: string, options?: TtsOptions): Promise<Uint8Array>;
}

Configuration

I-configure ang voice settings sa triggerfish.yaml:

yaml
voice:
  stt:
    provider: whisper # whisper | deepgram | openai
    model: base # Whisper model size (tiny, base, small, medium, large)
  tts:
    provider: elevenlabs # elevenlabs | openai | system
    voice_id: "your-voice" # Provider-specific voice identifier
  wake_word: "triggerfish" # Custom wake word
  push_to_talk:
    shortcut: "Ctrl+Space" # Keyboard shortcut (macOS)

Security Integration

Sinusunod ng voice data ang parehong classification rules tulad ng text:

  • Kla-classify ang voice input tulad ng text input. Pumapasok ang transcribed speech sa session at maaaring mag-escalate ng taint tulad ng nai-type na mensahe.
  • Dumadaan ang TTS output sa PRE_OUTPUT hook bago ang synthesis. Kung bina-block ng policy engine ang response, hindi ito kailanman sinasalita.
  • May taint ang voice sessions tulad ng text sessions. Ang pag-switch sa voice sa gitna ng session ay hindi nagre-reset ng taint.
  • Lokal na tumatakbo ang wake word detection. Walang audio na ipinapadala sa cloud para sa wake word matching.
  • Ang audio recordings (kung nire-retain) ay classified sa taint level ng session.

Ang voice pipeline ay mag-integrate sa Buoy companion apps sa iOS at Android, na nagbibigay-daan sa push-to-talk at voice wake mula sa mobile devices. Hindi pa available ang Buoy. :::