Skip to main content

Crate deepgram

Crate deepgram 

Source
Expand description

Official Rust SDK for Deepgram’s automated speech recognition APIs.

Get started transcribing with a Transcription object.

§Cargo features

  • listen (default): speech-to-text, REST and WebSocket, including Flux.
  • speak (default): text-to-speech, REST and WebSocket, including Flux.
  • manage (default): project, key, and usage management.
  • read (default): Text Intelligence over /v1/read; see the read module.
  • agent (default): the Voice Agent WebSocket client; see the agent module.
  • connect-diagnostics: per-phase connect timings for /v1/listen WebSocket connections; see the diagnostics module.
  • rustls-tls-native-roots: also trust the operating system’s certificate store for wss:// WebSocket connections, on top of the bundled public roots. For TLS-inspecting proxies, internal CAs, and self-hosted deployments; see the tls module.

Re-exports§

pub use listen::websocket::TranscriptionStream;
pub use read::TextIntelligence;
pub use rustls;

Modules§

agent
Voice Agent (/v1/agent/converse) types.
auth
Token-based authentication for Deepgram.
common
Common lib for other modules
diagnostics
Opt-in connect-time diagnostics for live transcription streaming connections (/v1/listen).
listen
Listen module
manage
Manage module
read
Analyze text with Deepgram’s Text Intelligence (/v1/read) API.
speak
Speak module
tls
TLS trust for wss:// WebSocket connections.

Structs§

Deepgram
A client for the Deepgram API.
HttpError
A generic “error” for HTTP connections
ReqwestError
The Errors that may occur when processing a Request.
SerdeJsonError
This type represents all possible errors that can occur when serializing or deserializing JSON data.
Speak
Generate speech from text using Deepgram’s text to speech api.
Transcription
Transcribe audio using Deepgram’s automated speech recognition.

Enums§

DeepgramError
Errors that may arise from the deepgram crate.
SerdeUrlencodedError
Errors returned during serializing to application/x-www-form-urlencoded.
TungsteniteError
Possible WebSocket errors.