Spaces:
Sleeping
Sleeping
Upload README.md
Browse files
README.md
CHANGED
@@ -1,107 +1,42 @@
|
|
1 |
-
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
4 |
-
# Model card for CLAP
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
1. [Model Details](#model-details)
|
15 |
-
2. [Usage](#usage)
|
16 |
-
3. [Uses](#uses)
|
17 |
-
4. [Citation](#citation)
|
18 |
|
19 |
-
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
24 |
|
|
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
# Uses
|
31 |
-
|
32 |
-
## Perform zero-shot audio classification
|
33 |
-
|
34 |
-
### Using `pipeline`
|
35 |
-
|
36 |
-
```python
|
37 |
-
from datasets import load_dataset
|
38 |
-
from transformers import pipeline
|
39 |
-
|
40 |
-
dataset = load_dataset("ashraq/esc50")
|
41 |
-
audio = dataset["train"]["audio"][-1]["array"]
|
42 |
-
|
43 |
-
audio_classifier = pipeline(task="zero-shot-audio-classification", model="laion/clap-htsat-fused")
|
44 |
-
output = audio_classifier(audio, candidate_labels=["Sound of a dog", "Sound of vaccum cleaner"])
|
45 |
-
print(output)
|
46 |
-
>>> [{"score": 0.999, "label": "Sound of a dog"}, {"score": 0.001, "label": "Sound of vaccum cleaner"}]
|
47 |
-
```
|
48 |
-
|
49 |
-
## Run the model:
|
50 |
-
|
51 |
-
You can also get the audio and text embeddings using `ClapModel`
|
52 |
-
|
53 |
-
### Run the model on CPU:
|
54 |
-
|
55 |
-
```python
|
56 |
-
from datasets import load_dataset
|
57 |
-
from transformers import ClapModel, ClapProcessor
|
58 |
-
|
59 |
-
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
60 |
-
audio_sample = librispeech_dummy[0]
|
61 |
-
|
62 |
-
model = ClapModel.from_pretrained("laion/clap-htsat-fused")
|
63 |
-
processor = ClapProcessor.from_pretrained("laion/clap-htsat-fused")
|
64 |
-
|
65 |
-
inputs = processor(audios=audio_sample["audio"]["array"], return_tensors="pt")
|
66 |
-
audio_embed = model.get_audio_features(**inputs)
|
67 |
-
```
|
68 |
-
|
69 |
-
### Run the model on GPU:
|
70 |
-
|
71 |
-
```python
|
72 |
-
from datasets import load_dataset
|
73 |
-
from transformers import ClapModel, ClapProcessor
|
74 |
-
|
75 |
-
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
76 |
-
audio_sample = librispeech_dummy[0]
|
77 |
-
|
78 |
-
model = ClapModel.from_pretrained("laion/clap-htsat-fused").to(0)
|
79 |
-
processor = ClapProcessor.from_pretrained("laion/clap-htsat-fused")
|
80 |
-
|
81 |
-
inputs = processor(audios=audio_sample["audio"]["array"], return_tensors="pt").to(0)
|
82 |
-
audio_embed = model.get_audio_features(**inputs)
|
83 |
-
```
|
84 |
-
|
85 |
-
|
86 |
-
# Citation
|
87 |
-
|
88 |
-
If you are using this model for your work, please consider citing the original paper:
|
89 |
-
```
|
90 |
-
@misc{https://doi.org/10.48550/arxiv.2211.06687,
|
91 |
-
doi = {10.48550/ARXIV.2211.06687},
|
92 |
-
|
93 |
-
url = {https://arxiv.org/abs/2211.06687},
|
94 |
-
|
95 |
-
author = {Wu, Yusong and Chen, Ke and Zhang, Tianyu and Hui, Yuchen and Berg-Kirkpatrick, Taylor and Dubnov, Shlomo},
|
96 |
-
|
97 |
-
keywords = {Sound (cs.SD), Audio and Speech Processing (eess.AS), FOS: Computer and information sciences, FOS: Computer and information sciences, FOS: Electrical engineering, electronic engineering, information engineering, FOS: Electrical engineering, electronic engineering, information engineering},
|
98 |
-
|
99 |
-
title = {Large-scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentation},
|
100 |
-
|
101 |
-
publisher = {arXiv},
|
102 |
-
|
103 |
-
year = {2022},
|
104 |
-
|
105 |
-
copyright = {Creative Commons Attribution 4.0 International}
|
106 |
-
}
|
107 |
-
```
|
|
|
1 |
+
<div align="center">
|
|
|
|
|
|
|
2 |
|
3 |
+
<img alt="LOGO" src="https://cdn.jsdelivr.net/gh/fishaudio/fish-diffusion@main/images/logo_512x512.png" width="256" height="256" />
|
4 |
|
5 |
+
# Bert-VITS2
|
6 |
|
7 |
+
VITS2 Backbone with multilingual bert
|
8 |
|
9 |
+
For quick guide, please refer to `webui_preprocess.py`.
|
10 |
|
11 |
+
简易教程请参见 `webui_preprocess.py`。
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
## 请注意,本项目核心思路来源于[anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS) 一个非常好的tts项目
|
14 |
+
## MassTTS的演示demo为[ai版峰哥锐评峰哥本人,并找回了在金三角失落的腰子](https://www.bilibili.com/video/BV1w24y1c7z9)
|
15 |
|
16 |
+
[//]: # (## 本项目与[PlayVoice/vits_chinese](https://github.com/PlayVoice/vits_chinese) 没有任何关系)
|
17 |
|
18 |
+
[//]: # ()
|
19 |
+
[//]: # (本仓库来源于之前朋友分享了ai峰哥的视频,本人被其中的效果惊艳,在自己尝试MassTTS以后发现fs在音质方面与vits有一定差距,并且training的pipeline比vits更复杂,因此按照其思路将bert)
|
20 |
|
21 |
+
## 成熟的旅行者/开拓者/舰长/博士/sensei/猎魔人/喵喵露/V应当参阅代码自己学习如何训练。
|
22 |
|
23 |
+
### 严禁将此项目用于一切违反《中华人民共和国宪法》,《中华人民共和国刑法》,《中华人民共和国治安管理处罚法》和《中华人民共和国民法典》之用途。
|
24 |
+
### 严禁用于任何政治相关用途。
|
25 |
+
#### Video:https://www.bilibili.com/video/BV1hp4y1K78E
|
26 |
+
#### Demo:https://www.bilibili.com/video/BV1TF411k78w
|
27 |
+
#### QQ Group:815818430
|
28 |
+
## References
|
29 |
+
+ [anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS)
|
30 |
+
+ [jaywalnut310/vits](https://github.com/jaywalnut310/vits)
|
31 |
+
+ [p0p4k/vits2_pytorch](https://github.com/p0p4k/vits2_pytorch)
|
32 |
+
+ [svc-develop-team/so-vits-svc](https://github.com/svc-develop-team/so-vits-svc)
|
33 |
+
+ [PaddlePaddle/PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)
|
34 |
+
+ [emotional-vits](https://github.com/innnky/emotional-vits)
|
35 |
+
+ [fish-speech](https://github.com/fishaudio/fish-speech)
|
36 |
+
+ [Bert-VITS2-UI](https://github.com/jiangyuxiaoxiao/Bert-VITS2-UI)
|
37 |
+
## 感谢所有贡献者作出的努力
|
38 |
+
<a href="https://github.com/fishaudio/Bert-VITS2/graphs/contributors" target="_blank">
|
39 |
+
<img src="https://contrib.rocks/image?repo=fishaudio/Bert-VITS2"/>
|
40 |
+
</a>
|
41 |
|
42 |
+
[//]: # (# 本项目所有代码引用均已写明,bert部分代码思路来源于[AI峰哥](https://www.bilibili.com/video/BV1w24y1c7z9),与[vits_chinese](https://github.com/PlayVoice/vits_chinese)无任何关系。欢迎各位查阅代码。同时,我们也对该开发者的[碰瓷,乃至开盒开发者的行为](https://www.bilibili.com/read/cv27101514/)表示强烈谴责。)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|