Skip to main content

Module types

Module types 

Source
Expand description

Shared types used across the crate.

Structs§

EngineDescriptor
Describes a registered engine for introspection.
LanguageCode
A language code entry with BCP-47, ISO 639-3, and display name.
SherpaLanguage
A language entry within a Sherpa-ONNX model.
SherpaModelInfo
Metadata for a Sherpa-ONNX model from the registry.
SpeakOptions
Options for speak/synth calls, matching Swift’s SpeakOptions.
TtsError
Error type for TTS operations.
Voice
A single voice offered by an engine, unified across all providers. Mirrors Swift’s UnifiedVoice.
WordBoundary
A word boundary event with timing information. Mirrors Swift’s WordBoundary.
tts_engine_info
C-compatible engine descriptor returned by tts_get_engines.
tts_voice
C-compatible voice descriptor returned by tts_get_voices.

Enums§

AudioFormat
Audio output format, matching Swift’s AudioFormat.
Gender
Voice gender, matching Swift’s UnifiedVoice.Gender.
SpeechPitch
Named speech pitch presets, matching Swift’s SpeechPitch.
SpeechRate
Named speech rate presets, matching Swift’s SpeechRate.

Functions§

normalize_gender
Normalize a raw gender string to a typed Gender.

Type Aliases§

TtsResult
Result alias using TtsError.