OpenAiSpeakProvider (speak/open_ai.rs)

deepgram-rust-sdk · src/agent/speak/open_ai.rs · rust · MIT
ai, AI / Agents

Config struct for OpenAI Text‑to‑Speech provider with model and voice options.

// Source: https://github.com/deepgram/deepgram-rust-sdk | License: MIT | Copyright 2022 Deepgram
// Provided via justclaw.it.com; keep this notice with the code.
//! OpenAI Speak (TTS) provider settings.
//!
//! Mirrors `asyncapi/schemas/agent/speak-providers/open-ai.yml`. Distinct
//! from the OpenAI _Think_ provider — same `type: open_ai` discriminator
//! but a different schema in a different settings block.

use serde::{Deserialize, Deserializer, Serialize, Serializer};

/// OpenAI as a Speak provider for the Voice Agent.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct OpenAiSpeakProvider {
    /// REST API version of OpenAI TTS.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<OpenAiSpeakVersion>,

    

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key