Back to list
randysalars

voice-synthesis

by randysalars

0🍴 0📅 Jan 25, 2026

SKILL.md


name: Voice Synthesis tier: 3 load_policy: task-specific description: Generate voice audio using Google Cloud TTS with enhancement version: 1.0.0 parent_skill: production-operations

Voice Synthesis Skill

The Voice Is the Heart of the Journey

This skill handles converting SSML scripts to voice audio with psychoacoustic enhancement.


Purpose

Generate high-quality, hypnotic voice audio from SSML scripts using Google Cloud Text-to-Speech.


Production Voice Standard

Always use: en-US-Neural2-H (bright female)

ParameterValue
Voice IDen-US-Neural2-H
Speaking Rate0.88x (applied by TTS engine)
Pitch0 semitones (base)
EnhancementAlways enabled

Canonical Command

python3 scripts/core/generate_voice.py \
    sessions/{session}/working_files/script_voice_clean.ssml \
    sessions/{session}/output

This automatically:

  • Uses production voice (en-US-Neural2-H)
  • Applies 0.88x speaking rate baseline
  • Generates both raw and enhanced output
  • Outputs voice.mp3 and voice_enhanced.mp3

Voice Options Reference

Voice IDCharacterBest For
en-US-Neural2-HBright, clearProduction standard
en-US-Neural2-EDeep, resonantDarker themes, shadow work
en-US-Neural2-CSoft, gentleVery gentle sessions
en-US-Neural2-FClear, articulateEducational content
en-US-Neural2-GWarm, approachableConfidence, empowerment

Male Voices

Voice IDCharacterBest For
en-US-Neural2-DDeep, authoritativeGuided pathworkings
en-US-Neural2-IWarm, compassionateHealing journeys
en-US-Neural2-JRich, matureWisdom, elder guidance

Note: en-US-Neural2-A is MALE, not female.


Output Files

FilePurposeUse For
voice.mp3Raw TTS outputNever use directly
voice_enhanced.mp3Production voiceAlways use this
voice_enhanced.wavLossless for mixingAudio mixing input

Voice Enhancement

The generate_voice.py script applies these enhancements:

EnhancementEffect
Tape WarmthAnalog saturation (25% drive)
De-essingSibilance reduction (4-8 kHz)
Room ToneGentle reverb (4% wet)
EQ ShapingPresence boost, rumble cut

Chunking System

Large scripts are automatically chunked:

  1. Detection: Script exceeds API byte limit
  2. Splitting: At natural break points (<break time="3s"/> or greater)
  3. Generation: Each chunk processed separately
  4. Concatenation: Final output seamlessly joined

Duration Verification

After generation, verify duration matches target:

# Check duration
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 \
    sessions/{session}/output/voice_enhanced.mp3
Target DurationExpectedAcceptable Range
25 minutes25:0023:00 - 27:00
30 minutes30:0028:00 - 32:00
45 minutes45:0042:00 - 48:00

If duration is off:

  1. Adjust <break> durations in SSML
  2. Add/remove content as needed
  3. Regenerate voice

Prerequisites

Before running voice synthesis:

  1. Environment:

    source venv/bin/activate
    
  2. Google Cloud Auth:

    echo $GOOGLE_APPLICATION_CREDENTIALS
    # Should show path to credentials JSON
    
  3. SSML Validation:

    python3 scripts/utilities/validate_ssml.py sessions/{session}/working_files/script_voice_clean.ssml
    
  4. SFX Stripped:

    grep -c "\[SFX:" sessions/{session}/working_files/script_voice_clean.ssml
    # Should return 0
    

Troubleshooting

IssueCauseSolution
"Authentication failed"Missing credentialsCheck GOOGLE_APPLICATION_CREDENTIALS
Robotic soundUsing slow rate in SSMLUse rate="1.0", breaks for pacing
TTS reads "[SFX:..."SFX markers not strippedUse script_voice_clean.ssml
Chunking errorsBreak points too far apartAdd <break time="3s"/> every few paragraphs
Duration too shortNot enough contentAdd more script content
Duration too longToo much contentTrim or reduce break times

Integration with Pipeline

Before (dependencies):

  • SSML script validated
  • SFX markers stripped

After (next steps):

  • Audio mixing with binaural and SFX
  • Hypnotic post-processing

Quality Checklist

Before proceeding to mixing:

  • voice_enhanced.mp3 exists
  • Duration within acceptable range
  • No clipping (peak < 0 dB)
  • No artifacts or glitches
  • Pacing sounds natural
  • All words clearly articulated

  • Skill: tier3-production/ssml-generation/ (input)
  • Skill: tier3-production/audio-mixing/ (next step)
  • Serena Memory: audio_production_methodology
  • Script: scripts/core/generate_voice.py

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon