gitmodelmujtaba commited on
Commit
8aa3184
·
verified ·
1 Parent(s): 8757c0b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +94 -0
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - text-to-speech
7
+ - kokoro
8
+ - onnx
9
+ - audio
10
+ - voiceover
11
+ - documentary
12
+ - podcast
13
+ pipeline_tag: text-to-speech
14
+ ---
15
+
16
+ # Kokoro Grounded Documentary Voiceover Model
17
+
18
+ A broadcast-grade text-to-speech engine powered by **Kokoro-ONNX**, featuring the **Grounded Documentary** voice profile (55% `bm_george` + 45% `bm_daniel`, British RP).
19
+
20
+ Tuned specifically for long-form documentary, philosophical, and educational narration with:
21
+ 1. **Deliberate Pacing**: Unhurried speed (`0.92`), natural sentence pauses (`0.42s`), and extended pauses (`1.25s–1.35s`) across major thematic shifts.
22
+ 2. **Grounded Tone**: Deep, comforting lower-mid chest resonance preventing listening fatigue over long sessions.
23
+ 3. **Subtle Modulation**: Narrative emphasis carried via pitch inflection rather than jarring volume spikes.
24
+ 4. **Targeted De-Essing & Mastering**: Built-in broadcast mastering chain cutting harsh sibilance on high frequencies ('s', 'sh') with EBU R128 (-16 LUFS) loudness normalization.
25
+
26
+ ---
27
+
28
+ ## Quickstart (Python)
29
+
30
+ ```bash
31
+ pip install kokoro-onnx soundfile huggingface_hub
32
+ ```
33
+
34
+ ```python
35
+ import numpy as np
36
+ import soundfile as sf
37
+ from kokoro_onnx import Kokoro
38
+ from huggingface_hub import hf_hub_download
39
+
40
+ REPO_ID = "gitmodelmujtaba/kokoro-grounded-documentary"
41
+
42
+ # 1. Download model weights and tuned voice profile
43
+ model_path = hf_hub_download(repo_id=REPO_ID, filename="kokoro-v1.0.onnx")
44
+ voices_path = hf_hub_download(repo_id=REPO_ID, filename="voices-v1.0.bin")
45
+ profile_path = hf_hub_download(repo_id=REPO_ID, filename="grounded_documentary.npy")
46
+
47
+ # 2. Initialize Kokoro
48
+ kokoro = Kokoro(model_path, voices_path)
49
+ voice_style = np.load(profile_path)
50
+
51
+ # 3. Generate Speech
52
+ text = "Look up at the night sky... To you, it might look like an endless ocean of cold vacuum."
53
+ audio, sr = kokoro.create(
54
+ text,
55
+ voice=voice_style,
56
+ speed=0.92,
57
+ lang="en-gb",
58
+ sentence_pause=0.42,
59
+ clause_pause=0.20
60
+ )
61
+
62
+ sf.write("output.wav", audio, sr)
63
+ print(f"Generated {len(audio)/sr:.2f}s of broadcast narration!")
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Broadcast Mastering Chain (FFmpeg)
69
+
70
+ For broadcast-grade warmth and smooth de-essing matching YouTube documentary standards:
71
+
72
+ ```bash
73
+ ffmpeg -y -i output.wav -af \
74
+ "highpass=f=80,\
75
+ equalizer=f=160:t=q:w=1.0:g=2.8,\
76
+ equalizer=f=260:t=q:w=1.2:g=2.0,\
77
+ equalizer=f=450:t=q:w=2.0:g=-2.0,\
78
+ equalizer=f=3200:t=q:w=2.0:g=-1.6,\
79
+ equalizer=f=5800:t=q:w=2.5:g=-3.5,\
80
+ equalizer=f=7200:t=q:w=2.5:g=-3.0,\
81
+ lowpass=f=11000,\
82
+ deesser=i=0.45:m=0.5:f=0.55:s=o,\
83
+ compand=attacks=0.03:decays=0.3:points=-80/-80|-35/-25|-16/-13|0/-3,\
84
+ loudnorm=I=-16:TP=-1.5:LRA=8.5" \
85
+ -c:a libmp3lame -b:a 192k output_mastered.mp3
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Files in this Repository
91
+ * `kokoro-v1.0.onnx`: Kokoro ONNX model weights (310 MB).
92
+ * `voices-v1.0.bin`: Kokoro voice library (27 MB).
93
+ * `grounded_documentary.npy`: Pre-blended float32 voice embedding vector (510 KB).
94
+ * `narrator.py`: Self-contained Python helper script for single-command generation.