VoiceEngine (voice_engine v0.1.0)

Copy Markdown View Source

Shared voice infrastructure — STT/TTS behaviours, adapter implementations, and the VoiceBridge orchestrator.

Host applications configure and supervise VoiceEngine components. The library owns no state that outlives its callers.

Configuration

Each host app configures voice profiles under its own app env:

config :my_app, VoiceEngine.Config,
  current_profile: :eleven_labs,
  profiles: %{
    eleven_labs: [
      stt: VoiceEngine.ElevenLabs.STT,
      tts: VoiceEngine.ElevenLabs.TTS,
      common: [api_key: "..."],
      stt_opts: [...],
      tts_opts: [voice_id: "...", voice_settings: %{...}]
    ]
  }

Bridge

The VoiceEngine.Bridge GenServer orchestrates the STT → turn → TTS loop. It requires a :turn_fn callback — a function that takes text and returns {:ok, response} or {:error, reason}. This decouples the bridge from any specific conversation engine.