VoiceContext (voice_context v0.1.0)
Copy MarkdownVoice-to-text and text-to-context helpers.
Summary
Functions
Extracts context from text.
Transcribes audio then extracts context.
Transcribes audio into text.
Types
Functions
@spec extract_context( transcript(), keyword() ) :: {:ok, context()} | {:error, term()}
Extracts context from text.
Examples
iex> {:ok, ctx} = VoiceContext.extract_context("Book a meeting with Alice tomorrow about Elixir")
iex> ctx.intent
"schedule"
iex> "Alice" in ctx.entities
true
@spec from_audio( audio(), keyword() ) :: {:ok, %{transcript: transcript(), context: context()}} | {:error, term()}
Transcribes audio then extracts context.
Examples
iex> {:ok, result} = VoiceContext.from_audio("remind me to ship the Hex package")
iex> is_binary(result.transcript)
true
iex> is_map(result.context)
true
@spec transcribe( audio(), keyword() ) :: {:ok, transcript()} | {:error, term()}
Transcribes audio into text.
Examples
iex> {:ok, text} = VoiceContext.transcribe("hello from audio")
iex> text
"hello from audio"