niobures commited on
Commit
8bee564
·
verified ·
1 Parent(s): 4307b71
fr/.gitattributes DELETED
@@ -1,36 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
36
- example.mp3 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fr/README.md DELETED
@@ -1,115 +0,0 @@
1
- ---
2
- license: cc-by-4.0
3
- datasets:
4
- - amphion/Emilia-Dataset
5
- language:
6
- - fr
7
- base_model:
8
- - ResembleAI/chatterbox
9
- pipeline_tag: text-to-speech
10
- tags:
11
- - french
12
- - audio
13
- - speech
14
- - tts
15
- - fine-tuning
16
- - chatterbox
17
- - Emilia
18
- - voice-cloning
19
- - zero-shot
20
- ---
21
-
22
- # Chatterbox TTS French 🥖
23
-
24
- **Chatterbox TTS French** is a fine-tuned text-to-speech model specialized for the French language. The model has been trained on high-quality voice data for natural and expressive speech synthesis.
25
-
26
- <div align="center"><img width="400px" src="https://ih1.redbubble.net/image.5397735048.6235/bg,f8f8f8-flat,750x,075,f-pad,750x1000,f8f8f8.jpg" alt="baguette-france-tour-eiffel-image" /></div>
27
-
28
- - 🔊 **Language**: French 🇫🇷
29
- - 🗣️ **Training dataset**: [Emilia Dataset (FR branch)](https://huggingface.co/datasets/amphion/Emilia-Dataset)
30
- - ⏱️ **Data quantity**: 1400 hours of audio
31
-
32
- ## Usage Example
33
-
34
- Here’s how to generate speech using Chatterbox-TTS French:
35
-
36
- ```python
37
- import torch
38
- import soundfile as sf
39
- from chatterbox.tts import ChatterboxTTS
40
- from huggingface_hub import hf_hub_download
41
- from safetensors.torch import load_file
42
-
43
- # Configuration
44
- MODEL_REPO = "Thomcles/Chatterbox-TTS-French"
45
- CHECKPOINT_FILENAME = "t3_cfg.safetensors"
46
- OUTPUT_PATH = "output_cloned_voice.wav"
47
- TEXT_TO_SYNTHESIZE = "Jean-Paul Sartre laisse à la postérité une œuvre considérable, tant littéraire que philosophique, ayant influencée à la fois la vie politique française d'après-guerre et les penseurs de son temps (Merleau-Ponty et Alain Badiou notamment)."
48
-
49
- def get_device() -> str:
50
- return "cuda" if torch.cuda.is_available() else "cpu"
51
-
52
- def download_checkpoint(repo: str, filename: str) -> str:
53
- return hf_hub_download(repo_id=repo, filename=filename)
54
-
55
- def load_tts_model(repo: str, checkpoint_file: str, device: str) -> ChatterboxTTS:
56
- model = ChatterboxTTS.from_pretrained(device=device)
57
- checkpoint_path = download_checkpoint(repo, checkpoint_file)
58
- t3_state = load_file(checkpoint_path, device="cpu")
59
- model.t3.load_state_dict(t3_state)
60
- return model
61
-
62
- def synthesize_speech(model: ChatterboxTTS, text: str, audio_prompt_path:str, **kwargs) -> torch.Tensor:
63
- with torch.inference_mode():
64
- return model.generate(
65
- text=text,
66
- audio_prompt_path=audio_prompt_path,
67
- **kwargs
68
- )
69
-
70
- def save_audio(waveform: torch.Tensor, path: str, sample_rate: int):
71
- sf.write(path, waveform.squeeze().cpu().numpy(), sample_rate)
72
-
73
- def main():
74
- print("Loading model...")
75
- device = get_device()
76
- model = load_tts_model(MODEL_REPO, CHECKPOINT_FILENAME, device)
77
-
78
- print(f"Generating speech on {device}...")
79
- wav = synthesize_speech(
80
- model,
81
- TEXT_TO_SYNTHESIZE,
82
- audio_prompt_path=None,
83
- exaggeration=0.5,
84
- temperature=0.6,
85
- cfg_weight=0.3
86
- )
87
-
88
- print(f"Saving output to: {OUTPUT_PATH}")
89
- save_audio(wav, OUTPUT_PATH, model.sr)
90
- print("Done.")
91
-
92
- if __name__ == "__main__":
93
- main()
94
- ```
95
-
96
- Here is the output:
97
-
98
- <audio controls src="https://huggingface.co/Thomcles/Chatterbox-TTS-French/resolve/main/example.mp3">Your browser does not support audio.</audio>
99
-
100
- ### Base model license
101
-
102
- The base model is licensed under the MIT License.
103
- Base model: [Chatterbox](https://huggingface.co/ResembleAI/chatterbox)
104
- License: [MIT](https://choosealicense.com/licenses/mit/)
105
-
106
- ### Training Data License
107
-
108
- This model was fine-tuned using a dataset licensed under Creative Commons Attribution 4.0 (CC BY 4.0).
109
- Dataset: [Emilia](https://huggingface.co/datasets/amphion/Emilia-Dataset)
110
- License: [Creative Commons Attribution 4.0 International](https://choosealicense.com/licenses/cc-by-4.0/)
111
-
112
-
113
- ### Contact me
114
-
115
- Interested in fine-tuning a TTS model in a specific language or building a multilingual voice solution? Don’t hesitate to reach out.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fr/demo_audios/0.mp3 DELETED
Binary file (26.1 kB)
 
fr/demo_audios/1.mp3 DELETED
Binary file (44.7 kB)
 
fr/demo_audios/2.mp3 DELETED
Binary file (31 kB)
 
fr/demo_audios/3.mp3 DELETED
Binary file (35.6 kB)
 
fr/demo_audios/4.mp3 DELETED
Binary file (32.4 kB)
 
fr/demo_audios/5.mp3 DELETED
Binary file (31.2 kB)
 
fr/demo_audios/fa_0.mp3 DELETED
Binary file (34.8 kB)
 
fr/demo_audios/fa_1.mp3 DELETED
Binary file (26.9 kB)
 
fr/demo_audios/fa_2.mp3 DELETED
Binary file (29.9 kB)
 
fr/demo_audios/fa_3.mp3 DELETED
Binary file (24 kB)
 
fr/demo_audios/fa_4.mp3 DELETED
Binary file (30.5 kB)
 
fr/demo_audios/fa_5.mp3 DELETED
Binary file (50.9 kB)
 
fr/example.wav DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cd6f17fcf884ea6f0f7e8a537cba6c1b397bb11a90e6cecb739209d4c4cd02aa
3
- size 474284
 
 
 
 
fr/source.txt DELETED
@@ -1 +0,0 @@
1
- https://huggingface.co/Thomcles/Chatterbox-TTS-French
 
 
fr/t3_cfg.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2e1066369c4ba2e0351199ceff2fcb5098e4b7233bba3dbbc12f1f9a78aa741c
3
- size 2129653744