Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- amphion/Emilia-Dataset
|
| 5 |
+
language:
|
| 6 |
+
- de
|
| 7 |
+
- en
|
| 8 |
+
base_model:
|
| 9 |
+
- neuphonic/neucodec
|
| 10 |
+
tags:
|
| 11 |
+
- audio
|
| 12 |
+
- speech
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## NeuCodec decoder fine-tuned for German speech
|
| 16 |
+
|
| 17 |
+
This is just the decoder of [neuphonic/neucodec](https://huggingface.co/neuphonic/neucodec), fine-tuned on equal amounts of German and English speech data from Emilia-Yodas, to enhance decoding quality of German speech.
|
| 18 |
+
Since we only fine-tuned the decoder, the codebook is identical to the base model, meaning this model can be used with the regular NeuCodec encoder.
|
| 19 |
+
|
| 20 |
+
We supply a compact class `NeuCodecDecoder.py` to easily run inference with this decoder since the NeuCodec codebase doesn't easily allow loading model files from foreign HuggingFace repos.
|
| 21 |
+
|
| 22 |
+
### Inference Example
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
import torch
|
| 26 |
+
import torchaudio
|
| 27 |
+
|
| 28 |
+
from NeuCodecDecoder import NeuCodecDecoder
|
| 29 |
+
|
| 30 |
+
decoder_model = NeuCodecDecoder.from_pretrained("DigitalLearningGmbH/neucodec-decoder-ft-de")
|
| 31 |
+
decoder_model = decoder_model.eval().cuda()
|
| 32 |
+
|
| 33 |
+
with torch.no_grad():
|
| 34 |
+
decoded = decoder_model.decode_code(torch.tensor(tokens).unsqueeze(0).unsqueeze(0).to('cuda')).cpu()
|
| 35 |
+
|
| 36 |
+
torchaudio.save("decoded.wav", decoded[0, :, :], 24_000)
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
For more information please refer to [the original model card](https://huggingface.co/neuphonic/neucodec).
|