Skip to main content

Module voice

Module voice 

Source
Expand description

The per-seat voice service: listeners, the sentence queue, and synthesis.

Re-exportsΒ§

use std::collections::BTreeSet; πŸ”’
use std::collections::HashMap; πŸ”’
use std::sync::atomic::AtomicUsize; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::Mutex; πŸ”’
use forge_primitives::Message; πŸ”’
use forge_primitives::SessionSlot; πŸ”’
use forge_tts::Chunk; πŸ”’
use forge_tts::Engine; πŸ”’
use forge_tts::SpeakRequest; πŸ”’
use tokio::sync::mpsc; πŸ”’
use tokio::sync::oneshot; πŸ”’
use tracing::Instrument; πŸ”’

StructsΒ§

Job πŸ”’
PreviewSlot πŸ”’
Seat πŸ”’
VoiceService
The per-seat voice service. One render queue per seat, so a second say waits behind the first, and one engine for the whole process, loaded at boot and kept for the process’s life; a failed warm is retried by the first say.
VoiceSettings
What one utterance renders with, from the [tts] section.
WorkspaceNotes πŸ”’
The note dispatch a real workspace hands the service: the listener note enters the seat as a forge prompt, drawn as its own row.
WorkspaceSink πŸ”’
The sink a real workspace hands the service: every rendered clip crosses the update stream to the clients subscribed to the seat.

EnumsΒ§

SayError
Why a say did not reach the sink.

ConstantsΒ§

LISTENING_NOTE
The note the first client’s turn-on puts into the seat.
NOT_LISTENING_NOTE
What the session is told when the last client leaves.
PREVIEW_LINE
The line a voice preview speaks, so two previews can be compared.

TraitsΒ§

AudioSink
Where a rendered clip goes.
NoteDispatch
How a listener note reaches the seat’s session.

FunctionsΒ§

note_envelope πŸ”’
The envelope a note rides, so a view draws it as information rather than as the reader’s own turn.
render πŸ”’

Type AliasesΒ§

Loader πŸ”’