AgentSea.Voice (agentsea_voice v0.1.0)

Copy Markdown

Voice facade over pluggable TTS/STT adapters.

Example

{:ok, %{audio: mp3}} =
  AgentSea.Voice.speak("Hello!", tts: {AgentSea.Voice.OpenAI, voice: "nova"})

{:ok, %{text: text}} =
  AgentSea.Voice.listen(mp3, stt: {AgentSea.Voice.OpenAI, []})

Summary

Functions

Transcribe audio. :stt is {module, opts} (a AgentSea.Voice.STT).

Synthesize speech. :tts is {module, opts} (a AgentSea.Voice.TTS).

Functions

listen(audio, opts)

@spec listen(
  binary(),
  keyword()
) :: {:ok, AgentSea.Voice.STT.result()} | {:error, term()}

Transcribe audio. :stt is {module, opts} (a AgentSea.Voice.STT).

speak(text, opts)

@spec speak(
  String.t(),
  keyword()
) :: {:ok, AgentSea.Voice.TTS.result()} | {:error, term()}

Synthesize speech. :tts is {module, opts} (a AgentSea.Voice.TTS).