pub struct TranscriptionConfig {Show 14 fields
pub enabled: bool,
pub default_provider: String,
pub api_key: Option<String>,
pub api_url: String,
pub model: String,
pub language: Option<String>,
pub initial_prompt: Option<String>,
pub max_duration_secs: u64,
pub openai: Option<OpenAiSttConfig>,
pub deepgram: Option<DeepgramSttConfig>,
pub assemblyai: Option<AssemblyAiSttConfig>,
pub google: Option<GoogleSttConfig>,
pub local_whisper: Option<LocalWhisperConfig>,
pub transcribe_non_ptt_audio: bool,
}Expand description
Voice transcription configuration with multi-provider support.
The top-level api_url, model, and api_key fields remain for backward
compatibility with existing Groq-based configurations.
Fields§
§enabled: boolEnable voice transcription for channels that support it.
default_provider: StringDefault STT provider: “groq”, “openai”, “deepgram”, “assemblyai”, “google”.
api_key: Option<String>API key used for transcription requests (Groq provider).
If unset, runtime falls back to GROQ_API_KEY for backward compatibility.
api_url: StringWhisper API endpoint URL (Groq provider).
model: StringWhisper model name (Groq provider).
language: Option<String>Optional language hint (ISO-639-1, e.g. “en”, “ru”) for Groq provider.
initial_prompt: Option<String>Optional initial prompt to bias transcription toward expected vocabulary
(proper nouns, technical terms, etc.). Sent as the prompt field in the
Whisper API request.
max_duration_secs: u64Maximum voice duration in seconds (messages longer than this are skipped).
openai: Option<OpenAiSttConfig>OpenAI Whisper STT provider configuration.
deepgram: Option<DeepgramSttConfig>Deepgram STT provider configuration.
assemblyai: Option<AssemblyAiSttConfig>AssemblyAI STT provider configuration.
google: Option<GoogleSttConfig>Google Cloud Speech-to-Text provider configuration.
local_whisper: Option<LocalWhisperConfig>Local/self-hosted Whisper-compatible STT provider.
transcribe_non_ptt_audio: boolAlso transcribe non-PTT (forwarded/regular) audio messages on WhatsApp,
not just voice notes. Default: false (preserves legacy behavior).
Trait Implementations§
Source§impl Clone for TranscriptionConfig
impl Clone for TranscriptionConfig
Source§fn clone(&self) -> TranscriptionConfig
fn clone(&self) -> TranscriptionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TranscriptionConfig
impl Debug for TranscriptionConfig
Source§impl Default for TranscriptionConfig
impl Default for TranscriptionConfig
Source§impl<'de> Deserialize<'de> for TranscriptionConfig
impl<'de> Deserialize<'de> for TranscriptionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for TranscriptionConfig
impl JsonSchema for TranscriptionConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TranscriptionConfig
impl RefUnwindSafe for TranscriptionConfig
impl Send for TranscriptionConfig
impl Sync for TranscriptionConfig
impl Unpin for TranscriptionConfig
impl UnsafeUnpin for TranscriptionConfig
impl UnwindSafe for TranscriptionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more