pub enum Provider {
Cohere,
OpenAiCompatible,
}Expand description
A known transcription backend.
Variants§
Cohere
Cohere’s hosted API — https://api.cohere.com/v2/audio/transcriptions.
OpenAiCompatible
Any self-hosted OpenAI-compatible server (e.g. vLLM at
/v1/audio/transcriptions), reached via an explicit URL.
Implementations§
Source§impl Provider
impl Provider
Sourcepub const ALL: &'static [Provider]
pub const ALL: &'static [Provider]
Every variant, so callers can enumerate the backends without matching by hand.
Sourcepub const ACCEPTED_NAMES: &'static [&'static str]
pub const ACCEPTED_NAMES: &'static [&'static str]
The spellings FromStr accepts, as the CLI and the Python
API document them.
Deliberately not derived from as_str: that returns the
provenance tag written onto a transcript, and for the self-hosted backend the tag
(openai-compatible) is not what a user types (openai). Error messages have to
come from here, or they tell people to pass a name the docs never mention.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Stable machine-readable tag, recorded on every crate::Transcript.
Trait Implementations§
impl Copy for Provider
impl Eq for Provider
Source§impl FromStr for Provider
impl FromStr for Provider
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse a backend name. "openai" is accepted alongside the canonical
"openai-compatible" because that is the spelling the CLI and the Python
binding have always exposed to users.