Docs/AngeVoice

Tune MOSS audio quality

Validate the reference and defaults first. Change one variable at a time and compare with the same text and audio.

MOSSReference audioAudio quality

Check the reference audio first

Stable baseline

MOSS_PROMPT_AUDIO_MAX_SECONDS=8
MOSS_SAMPLE_MODE=fixed
MOSS_SEED=1234
MOSS_SEGMENT_LENGTH=120
MOSS_STREAM_CHUNK_SECONDS=0.40
MOSS_STREAM_PREBUFFER_SECONDS=0.75
MOSS_MAX_SILENCE_MS=480
MOSS_CROSSFADE_MS=12
MOSS_OUTPUT_TARGET_PEAK=0.86
MOSS_OUTPUT_GAIN=0.94
MOSS_OUTPUT_EDGE_FADE_MS=1.5
MOSS_REALTIME_STREAMING_DECODE=true

Adjust by workload

WorkloadRecommendation
Stable NAS operationKeep moderate segments, fixed sampling and a short reference
Long Chinese narrationIncrease segment length gradually and listen for boundary problems
Mixed Chinese and EnglishAvoid very long segments and verify the configured English policy
Low-latency dialogueUse smaller chunks; increase prebuffer if playback stalls

Adjust by symptom

SymptomFirst action
Clipping or harsh outputLower input/output gain and keep the target peak near 0.86
Electrical noise at boundariesKeep edge fades and a short crossfade; compare with frame-by-frame decode disabled
Long silenceReduce maximum silence and inspect the end of the reference audio
Repeated words or drifting endingsUse shorter text segments
Clone OOMShorten the reference before changing concurrency

Measure and listen

python scripts/analyze_audio_quality.py output.wav

Automated checks cannot judge natural prosody. Always perform an A/B listening test with the same inputs.