Views
No views yet
Score Vector (59-dim)
→ score_dense_0 (59 → 256, SiLU activation)
→ score_dense_1 (256 → 256, ZERO-initialized)
→ Added to Timestep Embedding (256-dim)
→ cond_dense_0 (256 → 1280)
→ SiLU
→ cond_dense_1 (1280 → 1280)
→ Per-block AdaLN: scale/shift/gate for all 24 Transformer blocks| # | Dimension | Description |
|---|---|---|
| 0 | Affection | Warmth, love, caring tone |
| 2 | Amusement | Finding something funny |
| 3 | Anger | Frustration, rage, hostility |
| 5 | Astonishment_Surprise | Shock, being caught off guard |
| 7 | Awe | Wonder, reverence |
| 9 | Bitterness | Resentment, cynicism |
| 10 | Concentration | Focused, deliberate speech |
| 12 | Confusion | Uncertainty, bewilderment |
| 13 | Contemplation | Thoughtful, reflective |
| 14 | Contempt | Disdain, looking down |
| 15 | Contentment | Satisfaction, peace |
| 16 | Disappointment | Letdown |
| 17 | Disgust | Revulsion |
| 18 | Distress | Suffering, anguish |
| 19 | Doubt | Skepticism |
| 20 | Elation | Joy, happiness |
| 21 | Embarrassment | Self-consciousness |
| 22 | Emotional_Numbness | Flatness |
| 23 | Fatigue_Exhaustion | Tiredness |
| 24 | Fear | Anxiety, being scared |
| 26 | Helplessness | Feeling powerless |
| 28 | Hope_Enthusiasm_Optimism | Positive outlook |
| 29 | Impatience_and_Irritability | Annoyance |
| 30 | Infatuation | Intense attraction |
| 31 | Interest | Engagement, curiosity |
| 32 | Intoxication_Altered_States | Altered speech |
| 33 | Jealousy_&_Envy | Coveting |
| 34 | Longing | Yearning |
| 35 | Malevolence_Malice | Ill intent |
| 37 | Pain | Physical/emotional pain |
| 38 | Pleasure_Ecstasy | Delight, bliss |
| 39 | Pride | Accomplishment |
| 41 | Relief | Release of tension |
| 42 | Sadness | Sorrow, melancholy |
| 44 | Sexual_Lust | Desire |
| 45 | Shame | Guilt |
| 47 | Sourness | Acidity in tone |
| 49 | Teasing | Playful mockery |
| 50 | Thankfulness_Gratitude | Appreciation |
| 51 | Triumph | Victory |
| # | Dimension | Description |
|---|---|---|
| 1 | Age | Speaker age (higher = older) |
| 4 | Arousal | Energy level (low=calm, high=excited) |
| 6 | Authenticity | How genuine the speech sounds |
| 8 | Background_Noise | Amount of background noise |
| 11 | Confident_vs._Hesitant | Confidence level |
| 25 | Gender | Vocal gender (neg=male, pos=female) |
| 27 | High-Pitched_vs._Low-Pitched | Vocal pitch |
| 36 | Monotone_vs._Expressive | Expressiveness |
| 40 | Recording_Quality | Recording quality |
| 43 | Serious_vs._Humorous | Tone (low=serious, high=funny) |
| 46 | Soft_vs._Harsh | Voice texture |
| 48 | Submissive_vs._Dominant | Dominance |
| 52 | Valence | Positive/negative (high=positive) |
| 53 | Vulnerable_vs._Emotionally_Detached | Vulnerability |
| 54 | Warm_vs._Cold | Voice warmth |
| # | Dimension | Description | Range |
|---|---|---|---|
| 55 | score_background_quality | Background cleanliness | ~1-5 MOS |
| 56 | score_content_enjoyment | Content engagement | ~1-5 MOS |
| 57 | score_overall_quality | Overall audio quality | ~1-5 MOS |
| 58 | score_speech_quality | Speech clarity | ~1-5 MOS |
pip install numpy1from inference import create_score_vector, create_preset_scores, load_checkpoint, generate_latents
2import numpy as np
3
4# Load the fine-tuned model
5params = load_checkpoint("checkpoints/step_0019500.pkl")
6
7# Create conditioning scores
8# Option 1: Set specific dimensions
9scores = create_score_vector(
10 Amusement=2.5, # Amused/funny tone
11 Interest=3.0, # Engaged, curious
12 Valence=2.0, # Positive mood
13 score_overall_quality=3.5, # High quality
14)
15
16# Option 2: Use a preset
17scores = create_preset_scores('happy') # or 'angry', 'sad', 'calm', 'excited', etc.
18
19# Prepare speaker reference (from your audio codec latents)
20ref_latent = np.load("your_speaker_ref.npy") # shape: (frames, 128)
21
22# Generate speech latents
23latents = generate_latents(
24 params,
25 text="Hello! This is emotion-conditioned speech.",
26 ref_latent=ref_latent,
27 scores=scores,
28 num_frames=256, # ~10 seconds at 25fps
29 num_steps=50, # ODE solver steps
30)
31# latents shape: (256, 128) - decode with your audio codec1# Single dimension: just set one score
2scores = create_score_vector(Anger=3.0)
3
4# Multiple dimensions: combine freely
5scores = create_score_vector(
6 Anger=2.0,
7 Arousal=3.0,
8 Submissive_vs._Dominant=2.5,
9 score_overall_quality=3.0,
10)
11
12# All unset dimensions default to 0.0 (neutral)| Preset | Key Dimensions |
|---|---|
happy | Amusement, Elation, Contentment, high Valence |
angry | Anger, high Arousal, Dominance |
sad | Sadness, Distress, low Valence |
calm | Contentment, low Arousal, Authenticity |
excited | Elation, high Arousal, Interest, Expressiveness |
professional | Concentration, Confidence, high Quality scores |
whisper | Low Arousal, Soft voice, low Dominance |
storytelling | Interest, Expressiveness, high Enjoyment |
checkpoints/step_*.pkl - Model checkpoints at various training stepsinference.py - Inference code with score helpers and presetstraining_log.txt - Full training log