Skip to main content

Module speech

Module speech 

Source
Expand description

Speech out (text to speech): what a speaking model (Purpose::Speak) does, takes and allows, as a SpeechProfile.

The profile has the same fields and the same wire form as weirdnet_agent::speech::SpeechProfile (since weirdnet-agent 0.5.11), so a record written here reads there; with the agent feature the two convert with From both ways. Without it this crate stays free of the agent.

Profiles are cited or absent. A bool is true only when the model is known to do it; a list or limit is None (or, for formats, empty) when nobody reported it, never defaulted. Profiles come from:

  • the catalog (CatalogEntry::speech), each cited to the model’s card and its engine’s documentation;
  • a hand-placed GGUF’s header (from_gguf), for the speech models llama.cpp documents;
  • the engine at load (weirdnet-backends), kept with the measured limits (LimitsRecord::speech).

Structs§

SpeechProfile
What one speaking model does, takes and allows. See the module docs; the fields are those of weirdnet_agent::speech::SpeechProfile, with the same names on the wire.

Enums§

AudioFormat
An audio encoding for speech out: wav, pcm16 (raw little-endian 16-bit samples), mp3, opus or flac on the wire, as weirdnet_agent::speech::AudioFormat.
CloneMode
What a voice-cloning model needs with the reference clip: audio (the clip; a transcript is not used), audio_and_text (the clip; its transcript helps but may be left out) or audio_text_required on the wire, as weirdnet_agent::speech::CloneMode.

Constants§

FISH_AUDIO_COMMUNITY
The license name of Fish Audio Drama 3 (FISH_AUDIO_DRAMA_3), the Fish Audio Community License: free for research and non-commercial use, commercial use limited (an annual revenue cap, and no hosted text-to-speech service). Downloads need the operator’s explicit acceptance (Consent::accepting_license).

Functions§

from_gguf
The speech profile a hand-placed GGUF speech model’s headers give, for llama-server (the engine that runs GGUF speech models): None unless the projector generates audio (clip.has_gen_audio_encoder), which is how llama.cpp marks a speech model’s mmproj.
restricting_license
license (a header’s or a card’s) when it restricts use: anything but a permissive SPDX id, with Fish Audio’s license names as FISH_AUDIO_COMMUNITY. None when absent or permissive.