Prosody
Per-turn voice measurement and speaker-relative change
TranscribeTurn.prosody carries how the voice sounded on that turn, and how
it moved against the same speaker's own baseline.
interface Prosody {
state: ProsodyState;
change: ProsodyChange | null;
}ProsodyState
The suprasegmental readout of one turn: intonation, stress, rhythm, and voice quality in physical units.
interface ProsodyState {
intonation: {
pitch: number | null; // median F0, Hz
range: number | null; // F0 span, semitones
slope: number | null; // contour, semitones per second
};
stress: {
loudness: number | null; // loudness, dBFS
peak: number | null; // loudest instant, dBFS
};
rhythm: {
voiced: number | null; // fraction phonated, 0 to 1
pause: number | null; // fraction silent, 0 to 1
onset: number | null; // phonation restarts per second
};
tilt: number | null; // voice quality: spectral slope, dB per octave
clipping: number | null; // signal health: fraction at full scale, 0 to 1
}A field is null when the audio did not support the measurement. Pitch is
null on an unvoiced turn, because F0 does not exist on unphonated audio.
0 remains a valid reading.
ProsodyChange
change reports signed movement against the same speaker's preceding state,
the same families and names as state.
interface ProsodyChange {
intonation: {
pitch: number | null; // semitones against baseline
range: number | null;
slope: number | null;
};
stress: {
loudness: number | null; // dB against baseline
peak: number | null;
};
rhythm: {
voiced: number | null;
pause: number | null;
onset: number | null;
};
tilt: number | null;
}change is null on the speaker's first measured turn. Pitch change uses
semitones so the value represents the same interval across vocal registers.
const { prosody } = turn;
prosody?.state.intonation.pitch;
prosody?.state.stress.loudness;
prosody?.change?.intonation.pitch;
prosody?.change?.stress.loudness;TranscribeTurn
interface TranscribeTurn {
speaker: Speaker;
text: string;
startMs: number;
endMs: number;
prosody?: Prosody | null;
}prosody is omitted when transcribe or snapshot receives
{ prosody: false }.