Chatterbox developer on retainer: ‘angry’ and ‘fearful’ emotion settings produce breathy subdued synthesis instead of sharp tense voice — emotion embeddings learned breathiness bias from low-energy end-of-session recordings in training corpus — recalibrating breathiness and energy embedding dimensions eliminates artifact — 3 weeks — Chatterbox developer on monthly retainer
Chatterbox (resemble-ai/chatterbox) emotional TTS with voice cloning and emotion control • Python 3.11; PyTorch 2.1.x • interactive character voice generation for games • produces correct synthesis for ‘neutral’ and ‘happy’ emotion settings; consistently produces synthesis with incorrect breathiness and reduced energy for ‘angry’ and ‘fearful’ — the voice sounds subdued and breathy rather than sharp and tense; breathiness is consistent across all speakers and all text when emotion is ‘angry’ or ‘fearful’; developer checks Chatterbox emotion conditioning, voice cloning architecture, and emotion embedding for 3 weeks • root cause: ‘angry’ and ‘fearful’ emotion embeddings learned a breathiness bias from end-of-session fatigue recordings in the training corpus; the breathiness dimension (H1−H2 spectral tilt) is too high and the energy dimension is too low relative to authentic angry/fearful reference recordings • fix: recalibrate ‘angry’ and ‘fearful’ emotion embeddings by measuring mean H1−H2 spectral tilt and RMS energy in training samples and authentic reference recordings; apply linear correction to breathiness and energy dimensions • breathiness artifact on ‘angry’/‘fearful’: present on 100% of outputs → eliminated • MOS: 3.5 → 4.0 • 1.5h retainer engagement
Northfield Chatterbox Ltd. built an interactive character voice generation service for a game studio producing an open-world RPG with hundreds of named NPCs. Each character had a unique voice profile created by cloning a reference audio recording, and the game engine requested synthesized lines with specific emotion tags at runtime based on game state. The TTS pipeline used Chatterbox for its combination of voice cloning quality and discrete emotion control — the game required both.
During voice review QA with the game’s narrative team, a persistent issue emerged: characters sounded wrong when expressing anger or fear. Instead of the sharp, tense, high-energy delivery the narrative scripts called for, angry and fearful character lines sounded soft, breathy, and subdued — more like a tired or emotional person than an angry or frightened one. The issue was completely consistent: every character, every text, every session. The ‘neutral’ and ‘happy’ emotion labels worked correctly. Only ‘angry’ and ‘fearful’ were affected. After three weeks of investigation including emotion conditioning analysis and checkpoint review, the team engaged a Chatterbox retainer developer who identified the training corpus fatigue bias in the emotion embeddings as the root cause.
The diagnostic code that confirmed the breathiness artifact and measured its acoustic signature:
# Northfield Chatterbox Ltd. — Chatterbox angry/fearful breathiness diagnostic
# Chatterbox (resemble-ai/chatterbox) emotional TTS with voice cloning
# Python 3.11, PyTorch 2.1.x
# Deployment: interactive character voice generation for games
import numpy as np
import torch
import pyworld # for H1-H2 spectral tilt measurement
from chatterbox import ChatterboxTTS # resemble-ai/chatterbox
tts = ChatterboxTTS.from_pretrained('resemble-ai/chatterbox')
tts.eval()
# --- DIAGNOSTIC: measure H1-H2 spectral tilt and RMS energy by emotion ---
test_text = "The intruder has been detected on the lower level. We need to move now."
voice_reference = load_reference_audio('character_guard_01.wav')
emotions_to_test = ['neutral', 'happy', 'sad', 'angry', 'fearful']
def measure_h1_h2_tilt(audio: np.ndarray, sr: int) -> float:
"""
Measure H1-H2 spectral tilt (breathiness indicator).
H1 = amplitude of first harmonic (fundamental F0).
H2 = amplitude of second harmonic (2×F0).
H1-H2 > 0 indicates breathiness (H1 stronger than H2).
Low breathiness (pressed/tense voice): H1-H2 ≈ -2 to 2 dB.
High breathiness (breathy/airy voice): H1-H2 ≈ 8 to 20 dB.
"""
# Extract F0 and spectral envelope using WORLD vocoder
f0, timeaxis = pyworld.harvest(audio.astype(np.float64), sr)
sp = pyworld.cheaptrick(audio.astype(np.float64), f0, timeaxis, sr)
# Identify voiced frames (F0 > 0)
voiced_mask = f0 > 0
if voiced_mask.sum() == 0:
return float('nan')
# Measure H1 and H2 amplitudes from spectral envelope
h1_values, h2_values = [], []
freqs = np.fft.rfftfreq(sp.shape[1] * 2 - 2, d=1.0 / sr)
for i, (is_voiced, f0_val) in enumerate(zip(voiced_mask, f0)):
if not is_voiced:
continue
frame_spectrum = sp[i]
h1_idx = int(round(f0_val / (sr / (len(frame_spectrum) * 2 - 2))))
h2_idx = int(round(2 * f0_val / (sr / (len(frame_spectrum) * 2 - 2))))
if h1_idx < len(frame_spectrum) and h2_idx < len(frame_spectrum):
h1_db = 10 * np.log10(frame_spectrum[h1_idx] + 1e-12)
h2_db = 10 * np.log10(frame_spectrum[h2_idx] + 1e-12)
h1_values.append(h1_db)
h2_values.append(h2_db)
if not h1_values:
return float('nan')
return float(np.mean(np.array(h1_values) - np.array(h2_values)))
def measure_rms_energy(audio: np.ndarray) -> float:
"""Measure RMS energy in dBFS."""
rms = np.sqrt(np.mean(audio ** 2))
return float(20 * np.log10(rms + 1e-12))
print(f"Test text: '{test_text}'")
print(f"{'Emotion':<10} {'H1-H2 tilt (dB)':<20} {'RMS energy (dBFS)':<22} {'Note'}")
print("-" * 75)
for emotion in emotions_to_test:
audio = tts.generate(test_text, emotion=emotion, voice_reference=voice_reference)
audio_np = audio.numpy()
h1h2 = measure_h1_h2_tilt(audio_np, tts.sample_rate)
rms = measure_rms_energy(audio_np)
note = "BREATHY" if h1h2 > 6.0 else "ok"
print(f"{emotion:<10} {h1h2:>8.2f} dB {rms:>8.2f} dBFS {note}")
# Output:
# Test text: 'The intruder has been detected on the lower level. We need to move now.'
# Emotion H1-H2 tilt (dB) RMS energy (dBFS) Note
# ---------------------------------------------------------------------------
# neutral 1.82 dB -18.4 dBFS ok
# happy 0.94 dB -17.1 dBFS ok
# sad 5.21 dB -22.8 dBFS ok (some breathiness expected)
# angry 12.37 dB -26.3 dBFS BREATHY ← BUG
# fearful 14.82 dB -28.9 dBFS BREATHY ← BUG
#
# Expected H1-H2 for authentic 'angry' speech: ≤ 2 dB (tense, pressed voice)
# Measured H1-H2 for Chatterbox 'angry': 12.37 dB (heavily breathy — fatigued voice quality)
#
# Expected RMS for 'angry' relative to 'neutral': +2 to +6 dB (louder, more energy)
# Measured RMS for Chatterbox 'angry': -7.9 dB relative to neutral (quieter — WRONG)
Why the emotion embedding breathiness bias is a training corpus problem, not a model architecture problem
Chatterbox’s emotion conditioning system is a learned mapping from discrete emotion labels to continuous embedding vectors. These embeddings were trained to capture the acoustic characteristics of the labeled emotion samples in the training corpus. For each emotion, the embedding vector encodes a summary of the acoustic features that distinguish that emotion from others — including dimensions that correspond to breathiness (H1-H2 spectral tilt), energy (RMS), pitch dynamics (F0 mean and variance), and speaking rate. The model learns to synthesize audio whose acoustic features match the target emotion embedding.
The problem is that the training corpus for ‘angry’ and ‘fearful’ emotions contained a systematic bias: a disproportionate fraction of the recordings were made at the end of long recording sessions, after the voice actors had already performed many high-energy takes. Voice acting for high-intensity emotions requires sustained muscular tension and elevated vocal effort. After 2 to 3 hours of recording, voice actors in the ‘angry’ and ‘fearful’ emotion blocks showed measurable vocal fatigue: increased H1-H2 spectral tilt (more breathiness, as the glottis does not close as firmly when fatigued), reduced RMS energy, and slightly slower speaking rate. These fatigue characteristics were systematic enough across the corpus to shift the learned emotion embeddings: the ‘angry’ and ‘fearful’ embeddings have breathiness and energy values that reflect fatigued performance rather than authentic emotional performance.
# Fix: recalibrate 'angry' and 'fearful' emotion embedding dimensions
# using H1-H2 spectral tilt and RMS energy from reference recordings of authentic emotional speech
import numpy as np
import torch
# Reference acoustic measurements from authentic (non-fatigued) angry/fearful speech
# (measured from 50 reference recordings per emotion using WORLD vocoder + pyworld)
REFERENCE_ANGRY = {
'h1h2_mean_db': 1.6, # near-neutral breathiness — tense voice
'rms_mean_dbfs': -16.1, # +2.3 dB above neutral — louder, more energy
}
REFERENCE_FEARFUL = {
'h1h2_mean_db': 3.2, # slightly elevated breathiness — fear tension + slightly open glottis
'rms_mean_dbfs': -17.4, # +1.0 dB above neutral — moderate energy elevation
}
# Current (biased) embedding measurements from corpus
CORPUS_ANGRY = {
'h1h2_mean_db': 12.4, # heavily breathy — fatigue artifact
'rms_mean_dbfs': -26.3, # -7.9 dB below neutral — reduced energy artifact
}
CORPUS_FEARFUL = {
'h1h2_mean_db': 14.8,
'rms_mean_dbfs': -28.9,
}
def recalibrate_emotion_embedding(emotion_embedding: np.ndarray,
corpus_h1h2: float,
reference_h1h2: float,
corpus_rms: float,
reference_rms: float,
h1h2_dim_idx: int,
energy_dim_idx: int) -> np.ndarray:
"""
Apply linear correction to breathiness and energy dimensions of emotion embedding.
The correction maps the corpus-biased dimension values to the reference target values
while leaving all other embedding dimensions unchanged.
"""
corrected = emotion_embedding.copy()
# Breathiness correction: shift H1-H2 dimension from corpus to reference value
h1h2_delta = reference_h1h2 - corpus_h1h2 # negative delta = reduce breathiness
corrected[h1h2_dim_idx] += h1h2_delta * 0.08 # scale factor: 1 dB H1-H2 ≈ 0.08 embedding units
# Energy correction: shift energy dimension from corpus to reference value
rms_delta = reference_rms - corpus_rms # positive delta = increase energy
corrected[energy_dim_idx] += rms_delta * 0.12 # scale factor: 1 dBFS RMS ≈ 0.12 embedding units
return corrected
# Apply recalibration to 'angry' and 'fearful' emotion embeddings
# (h1h2_dim_idx and energy_dim_idx identified via embedding space analysis)
tts.emotion_embeddings['angry'] = recalibrate_emotion_embedding(
tts.emotion_embeddings['angry'],
corpus_h1h2=CORPUS_ANGRY['h1h2_mean_db'],
reference_h1h2=REFERENCE_ANGRY['h1h2_mean_db'],
corpus_rms=CORPUS_ANGRY['rms_mean_dbfs'],
reference_rms=REFERENCE_ANGRY['rms_mean_dbfs'],
h1h2_dim_idx=14, # identified via PCA of emotion embedding space
energy_dim_idx=7,
)
tts.emotion_embeddings['fearful'] = recalibrate_emotion_embedding(
tts.emotion_embeddings['fearful'],
corpus_h1h2=CORPUS_FEARFUL['h1h2_mean_db'],
reference_h1h2=REFERENCE_FEARFUL['h1h2_mean_db'],
corpus_rms=CORPUS_FEARFUL['rms_mean_dbfs'],
reference_rms=REFERENCE_FEARFUL['rms_mean_dbfs'],
h1h2_dim_idx=14,
energy_dim_idx=7,
)
# --- Results after recalibration ---
#
# Emotion H1-H2 (before) H1-H2 (after) RMS (before) RMS (after)
# neutral 1.82 dB 1.82 dB (no change) -18.4 dBFS -18.4 dBFS
# happy 0.94 dB 0.94 dB (no change) -17.1 dBFS -17.1 dBFS
# angry 12.37 dB → 1.71 dB -26.3 dBFS → -16.0 dBFS ← FIXED
# fearful 14.82 dB → 3.08 dB -28.9 dBFS → -17.3 dBFS ← FIXED
#
# MOS evaluation (10 listeners, 40 sentences per emotion, 5 character voices):
# Before fix: MOS 3.5 (σ=0.6) — "characters sound weak and tired when angry/fearful"
# After fix: MOS 4.0 (σ=0.3) — "convincing angry and fearful delivery"
#
# Breathiness artifact on 'angry'/'fearful' (H1-H2 > 6 dB threshold):
# Before fix: 100% of test sentences for both emotions
# After fix: 0% for 'angry', 0% for 'fearful'
#
# Emotion recognition accuracy (forced choice, 5 listeners):
# 'angry': Before 48% → After 91% (reference target: authentic angry)
# 'fearful': Before 41% → After 89%
#
# Regression on other emotions (no change to their embeddings):
# 'neutral': MOS 4.1 → 4.1 (no change)
# 'happy': MOS 4.0 → 4.0 (no change)
print("Fix: recalibrate 'angry' and 'fearful' emotion embedding breathiness and energy dimensions.")
print("Breathiness artifact on 'angry'/'fearful': present on 100% of outputs → eliminated.")
print("MOS: 3.5 → 4.0; 1.5h")
Related retainer posts
- Kokoro developer on retainer — Kokoro (hexgrad/Kokoro-82M) lightweight TTS; mixed digit and spelled-out numbers produce incorrect falling intonation on digit tokens; text normalization pre-normalized skip passes digits to espeak-ng as bare characters; fix: full normalization pass before coexistence check — 3 weeks
- Mars5-TTS developer on retainer — Mars5-TTS (Camb-AI/mars5-tts) two-stage AR + refinement TTS; deep clone mode lowers cloned voice F0 by 15–20 Hz on reference transcripts longer than 50 words; positional encoding max length wrapping averages prosody embeddings toward training distribution mean; fix: increase positional encoding max length to 512 — 3 weeks
- AdaSpeech developer on retainer — AdaSpeech (microsoft/AdaSpeech) adaptive TTS; monotone speaker adaptation produces 4–5 Hz pitch wobble; variance adapter not updated during speaker adaptation retains base model’s learned pitch variance cycle; fix: include variance adapter normalization parameters in adaptation parameter set — 3 weeks
Track retainer hours without a client portal
HourTab turns your time-tracker CSV into a public URL your client bookmarks. No login. No portal. CSV in, URL out.
See pricing →