Skip to content

Voice Pipeline

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

نیچے listed STT اور TTS providers interface-only stubs ہیں۔ Provider

interfaces define ہیں لیکن implementations ابھی actual speech services سے connected نہیں ہیں۔ :::

Triggerfish macOS، iOS، اور Android پر wake word detection، push-to-talk، اور text-to-speech response کے ساتھ speech interaction support کرتا ہے۔

Architecture

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

Audio text کی طرح ہی agent processing pipeline سے گزرتا ہے۔ Voice input transcribe ہوتا ہے، session میں classified message کے طور پر داخل ہوتا ہے، policy hooks سے گزرتا ہے، اور response speech میں synthesize ہوتا ہے۔

Voice Modes

ModeتفصیلPlatform
Voice WakeConfigurable wake word کے لیے always-on listeningmacOS, iOS, Android
Push-to-TalkButton یا keyboard shortcut سے manual activationmacOS (menu bar), iOS, Android
Talk ModeContinuous conversational speechتمام platforms

STT Providers

Speech-to-text آپ کی آواز کو agent کے process کرنے کے لیے text میں convert کرتا ہے۔

ProviderTypeنوٹس
WhisperLocalڈیفالٹ۔ On-device چلتا ہے، کوئی cloud dependency نہیں۔ Privacy کے لیے بہترین
DeepgramCloudLow-latency streaming transcription۔
OpenAI Whisper APICloudHigh accuracy، API key درکار ہے۔

TTS Providers

Text-to-speech agent responses کو spoken audio میں convert کرتا ہے۔

ProviderTypeنوٹس
ElevenLabsCloudڈیفالٹ۔ Voice cloning options کے ساتھ natural-sounding voices
OpenAI TTSCloudHigh quality، multiple voice options۔
System VoicesLocalOS-native voices۔ کوئی cloud dependency نہیں۔

Provider Registry

Triggerfish STT اور TTS دونوں کے لیے provider registry pattern استعمال کرتا ہے۔ آپ corresponding interface implement کر کے کوئی بھی compatible provider plug in کر سکتے ہیں:

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

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

Configuration

triggerfish.yaml میں voice settings configure کریں:

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

Voice data text کی طرح classification rules follow کرتا ہے:

  • Voice input text input کی طرح classified ہے۔ Transcribed speech session میں داخل ہوتا ہے اور taint escalate کر سکتا ہے جیسے typed message کرتا ہے۔
  • TTS output synthesis سے پہلے PRE_OUTPUT hook سے گزرتا ہے۔ اگر policy engine response block کرے، یہ کبھی بولا نہیں جاتا۔
  • Voice sessions taint carry کرتی ہیں جیسے text sessions۔ Mid-session voice پر switch کرنا taint reset نہیں کرتا۔
  • Wake word detection locally چلتی ہے۔ Wake word matching کے لیے کوئی audio cloud کو نہیں بھیجا جاتا۔
  • Audio recordings (اگر retain کیے جائیں) capture کے وقت session کے taint level پر classified ہوتے ہیں۔

Voice pipeline iOS اور Android پر Buoy companion apps کے ساتھ integrate

ہوگا، mobile devices سے push-to-talk اور voice wake ممکن بنائے گا۔ Buoy ابھی available نہیں ہے۔ :::