-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added KR pages & Documentations (#607)
* chore: sync upstream * feat: add ko pages * feat: add i18n(ko_KR.json) * docs: update finetune.md * docs: update inference.md * docs: update README.ko.md * docs: update index.md * docs: update inference.md * docs: update README.ko.md
- Loading branch information
1 parent
5c7e397
commit 8f481e6
Showing
10 changed files
with
852 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<div align="center"> | ||
<h1>Fish Speech</h1> | ||
|
||
[English](../README.md) | [简体中文](README.zh.md) | [Portuguese](README.pt-BR.md) | [日本語](README.ja.md) | **한국어** <br> | ||
|
||
<a href="https://www.producthunt.com/posts/fish-speech-1-4?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-fish-speech-1-4" target="_blank"> | ||
<img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=488440&theme=light" alt="Fish Speech 1.4 - Open-Source Multilingual Text-to-Speech with Voice Cloning | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /> | ||
</a> | ||
<a href="https://trendshift.io/repositories/7014" target="_blank"> | ||
<img src="https://trendshift.io/api/badge/repositories/7014" alt="fishaudio%2Ffish-speech | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/> | ||
</a> | ||
<br> | ||
</div> | ||
<br> | ||
|
||
<div align="center"> | ||
<img src="https://count.getloli.com/get/@fish-speech?theme=asoul" /><br> | ||
</div> | ||
<br> | ||
|
||
<div align="center"> | ||
<a target="_blank" href="https://discord.gg/Es5qTB9BcN"> | ||
<img alt="Discord" src="https://img.shields.io/discord/1214047546020728892?color=%23738ADB&label=Discord&logo=discord&logoColor=white&style=flat-square"/> | ||
</a> | ||
<a target="_blank" href="https://hub.docker.com/r/fishaudio/fish-speech"> | ||
<img alt="Docker" src="https://img.shields.io/docker/pulls/fishaudio/fish-speech?style=flat-square&logo=docker"/> | ||
</a> | ||
<a target="_blank" href="https://huggingface.co/spaces/fishaudio/fish-speech-1"> | ||
<img alt="Huggingface" src="https://img.shields.io/badge/🤗%20-space%20demo-yellow"/> | ||
</a> | ||
</div> | ||
|
||
이 코드베이스와 모든 모델은 CC-BY-NC-SA-4.0 라이선스에 따라 배포됩니다. 자세한 내용은 [LICENSE](LICENSE)를 참조하시길 바랍니다. | ||
|
||
--- | ||
|
||
## 기능 | ||
|
||
1. **Zero-shot & Few-shot TTS:** 10초에서 30초의 음성 샘플을 입력하여 고품질의 TTS 출력을 생성합니다. **자세한 가이드는 [모범 사례](https://docs.fish.audio/text-to-speech/voice-clone-best-practices)를 참조하시길 바랍니다.** | ||
|
||
2. **다국어 및 교차 언어 지원:** 다국어 걱정 없이, 텍스트를 입력창에 복사하여 붙여넣기만 하면 됩니다. 현재 영어, 일본어, 한국어, 중국어, 프랑스어, 독일어, 아랍어, 스페인어를 지원합니다. | ||
|
||
3. **음소 의존성 제거:** 이 모델은 강력한 일반화 능력을 가지고 있으며, TTS가 음소에 의존하지 않습니다. 모든 언어 스크립트 텍스트를 손쉽게 처리할 수 있습니다. | ||
|
||
4. **높은 정확도:** 영어 텍스트 기준 5분 기준에서 단, 2%의 문자 오류율(CER)과 단어 오류율(WER)을 달성합니다. | ||
|
||
5. **빠른 속도:** fish-tech 가속을 통해 실시간 인자(RTF)는 Nvidia RTX 4060 노트북에서는 약 1:5, Nvidia RTX 4090에서는 1:15입니다. | ||
|
||
6. **웹 UI 추론:** Chrome, Firefox, Edge 등 다양한 브라우저에서 호환되는 Gradio 기반의 사용하기 쉬운 웹 UI를 제공합니다. | ||
|
||
7. **GUI 추론:** PyQt6 그래픽 인터페이스를 제공하여 API 서버와 원활하게 작동합니다. Linux, Windows 및 macOS를 지원합니다. [GUI 참조](https://github.com/AnyaCoder/fish-speech-gui). | ||
|
||
8. **배포 친화적:** Linux, Windows, macOS에서 네이티브로 지원되는 추론 서버를 쉽게 설정할 수 있어 속도 손실을 최소화합니다. | ||
|
||
## 면책 조항 | ||
|
||
이 코드베이스의 불법적 사용에 대해 어떠한 책임도 지지 않습니다. DMCA 및 관련 법률에 대한 로컬 법률을 참조하십시오. | ||
|
||
## 온라인 데모 | ||
|
||
[Fish Audio](https://fish.audio) | ||
|
||
## 로컬 추론을 위한 빠른 시작 | ||
|
||
[inference.ipynb](/inference.ipynb) | ||
|
||
## 영상 | ||
|
||
#### V1.4 데모 영상: [Youtube](https://www.youtube.com/watch?v=Ghc8cJdQyKQ) | ||
|
||
## 문서 | ||
|
||
- [English](https://speech.fish.audio/) | ||
- [中文](https://speech.fish.audio/zh/) | ||
- [日本語](https://speech.fish.audio/ja/) | ||
- [Portuguese (Brazil)](https://speech.fish.audio/pt/) | ||
- [한국어](https://speech.fish.audio/ko/) | ||
|
||
## Samples (2024/10/02 V1.4) | ||
|
||
- [English](https://speech.fish.audio/samples/) | ||
- [中文](https://speech.fish.audio/zh/samples/) | ||
- [日本語](https://speech.fish.audio/ja/samples/) | ||
- [Portuguese (Brazil)](https://speech.fish.audio/pt/samples/) | ||
- [한국어](https://speech.fish.audio/ko/samples/) | ||
|
||
## Credits | ||
|
||
- [VITS2 (daniilrobnikov)](https://github.com/daniilrobnikov/vits2) | ||
- [Bert-VITS2](https://github.com/fishaudio/Bert-VITS2) | ||
- [GPT VITS](https://github.com/innnky/gpt-vits) | ||
- [MQTTS](https://github.com/b04901014/MQTTS) | ||
- [GPT Fast](https://github.com/pytorch-labs/gpt-fast) | ||
- [GPT-SoVITS](https://github.com/RVC-Boss/GPT-SoVITS) | ||
|
||
## Sponsor | ||
|
||
<div> | ||
<a href="https://6block.com/"> | ||
<img src="https://avatars.githubusercontent.com/u/60573493" width="100" height="100" alt="6Block Avatar"/> | ||
</a> | ||
<br> | ||
<a href="https://6block.com/">데이터 처리 후원: 6Block</a> | ||
</div> | ||
<div> | ||
<a href="https://www.lepton.ai/"> | ||
<img src="https://www.lepton.ai/favicons/apple-touch-icon.png" width="100" height="100" alt="Lepton Avatar"/> | ||
</a> | ||
<br> | ||
<a href="https://www.lepton.ai/">Fish Audio는 Lepton.AI에서 제공됩니다</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# 파인튜닝 | ||
|
||
이 페이지를 열었다는 것은, 사전 학습된 퓨샷(Few-shot) 모델의 성능에 만족하지 못했다는 의미일 것입니다. 데이터셋의 성능을 향상시키기 위해 모델을 파인튜닝하고 싶으시겠죠. | ||
|
||
현재 버전에서는 'LLAMA' 부분만 파인튜닝하시면 됩니다. | ||
|
||
## LLAMA 파인튜닝 | ||
### 1. 데이터셋 준비 | ||
|
||
``` | ||
. | ||
├── SPK1 | ||
│ ├── 21.15-26.44.lab | ||
│ ├── 21.15-26.44.mp3 | ||
│ ├── 27.51-29.98.lab | ||
│ ├── 27.51-29.98.mp3 | ||
│ ├── 30.1-32.71.lab | ||
│ └── 30.1-32.71.mp3 | ||
└── SPK2 | ||
├── 38.79-40.85.lab | ||
└── 38.79-40.85.mp3 | ||
``` | ||
|
||
위와 같은 형식으로 데이터셋을 변환하여 `data` 디렉토리 안에 배치하세요. 오디오 파일의 확장자는 `.mp3`, `.wav`, `.flac` 중 하나여야 하며, 주석 파일은 `.lab` 확장자를 사용해야 합니다. | ||
|
||
!!! info "데이터셋 형식" | ||
`.lab` 주석 파일은 오디오의 전사 내용만 포함하면 되며, 특별한 형식이 필요하지 않습니다. 예를 들어, `hi.mp3`에서 "Hello, goodbye"라는 대사를 말한다면, `hi.lab` 파일에는 "Hello, goodbye"라는 한 줄의 텍스트만 있어야 합니다. | ||
|
||
!!! warning | ||
데이터셋에 대한 음량 정규화(loudness normalization)를 적용하는 것이 좋습니다. 이를 위해 [fish-audio-preprocess](https://github.com/fishaudio/audio-preprocess)를 사용할 수 있습니다. | ||
|
||
```bash | ||
fap loudness-norm data-raw data --clean | ||
``` | ||
|
||
### 2. 시맨틱 토큰 배치 추출 | ||
|
||
VQGAN 가중치를 다운로드했는지 확인하세요. 다운로드하지 않았다면 아래 명령어를 실행하세요: | ||
|
||
```bash | ||
huggingface-cli download fishaudio/fish-speech-1.4 --local-dir checkpoints/fish-speech-1.4 | ||
``` | ||
|
||
이후 시맨틱 토큰을 추출하기 위해 아래 명령어를 실행하세요: | ||
|
||
```bash | ||
python tools/vqgan/extract_vq.py data \ | ||
--num-workers 1 --batch-size 16 \ | ||
--config-name "firefly_gan_vq" \ | ||
--checkpoint-path "checkpoints/fish-speech-1.4/firefly-gan-vq-fsq-8x1024-21hz-generator.pth" | ||
``` | ||
|
||
!!! note | ||
추출 속도를 높이기 위해 `--num-workers`와 `--batch-size` 값을 조정할 수 있지만, GPU 메모리 한도를 초과하지 않도록 주의하세요. | ||
VITS 형식의 경우, `--filelist xxx.list`를 사용하여 파일 목록을 지정할 수 있습니다. | ||
|
||
이 명령을 실행하면 `data` 디렉토리 안에 `.npy` 파일이 생성됩니다. 다음과 같이 표시됩니다: | ||
|
||
``` | ||
. | ||
├── SPK1 | ||
│ ├── 21.15-26.44.lab | ||
│ ├── 21.15-26.44.mp3 | ||
│ ├── 21.15-26.44.npy | ||
│ ├── 27.51-29.98.lab | ||
│ ├── 27.51-29.98.mp3 | ||
│ ├── 27.51-29.98.npy | ||
│ ├── 30.1-32.71.lab | ||
│ ├── 30.1-32.71.mp3 | ||
│ └── 30.1-32.71.npy | ||
└── SPK2 | ||
├── 38.79-40.85.lab | ||
├── 38.79-40.85.mp3 | ||
└── 38.79-40.85.npy | ||
``` | ||
|
||
### 3. 데이터셋을 protobuf로 패킹 | ||
|
||
```bash | ||
python tools/llama/build_dataset.py \ | ||
--input "data" \ | ||
--output "data/protos" \ | ||
--text-extension .lab \ | ||
--num-workers 16 | ||
``` | ||
|
||
명령이 완료되면 `data` 디렉토리 안에 `quantized-dataset-ft.protos` 파일이 생성됩니다. | ||
|
||
### 4. 마지막으로, LoRA를 이용한 파인튜닝 | ||
|
||
마찬가지로, `LLAMA` 가중치를 다운로드했는지 확인하세요. 다운로드하지 않았다면 아래 명령어를 실행하세요: | ||
|
||
```bash | ||
huggingface-cli download fishaudio/fish-speech-1.4 --local-dir checkpoints/fish-speech-1.4 | ||
``` | ||
|
||
마지막으로, 아래 명령어를 실행하여 파인튜닝을 시작할 수 있습니다: | ||
|
||
```bash | ||
python fish_speech/train.py --config-name text2semantic_finetune \ | ||
project=$project \ | ||
[email protected]_config=r_8_alpha_16 | ||
``` | ||
|
||
!!! note | ||
`batch_size`, `gradient_accumulation_steps` 등의 학습 매개변수를 GPU 메모리에 맞게 조정하려면 `fish_speech/configs/text2semantic_finetune.yaml` 파일을 수정할 수 있습니다. | ||
|
||
!!! note | ||
Windows 사용자의 경우, `nccl` 문제를 피하려면 `trainer.strategy.process_group_backend=gloo`를 사용할 수 있습니다. | ||
|
||
훈련이 완료되면 [추론](inference.md) 섹션을 참고하여 음성을 생성할 수 있습니다. | ||
|
||
!!! info | ||
기본적으로 모델은 화자의 말하는 패턴만 학습하고 음색은 학습하지 않습니다. 음색의 안정성을 위해 프롬프트를 사용해야 합니다. | ||
음색을 학습하려면 훈련 단계를 늘릴 수 있지만, 이는 과적합의 위험을 초래할 수 있습니다. | ||
|
||
훈련이 끝나면 LoRA 가중치를 일반 가중치로 변환한 후에 추론을 수행해야 합니다. | ||
|
||
```bash | ||
python tools/llama/merge_lora.py \ | ||
--lora-config r_8_alpha_16 \ | ||
--base-weight checkpoints/fish-speech-1.4 \ | ||
--lora-weight results/$project/checkpoints/step_000000010.ckpt \ | ||
--output checkpoints/fish-speech-1.4-yth-lora/ | ||
``` | ||
|
||
!!! note | ||
다른 체크포인트도 시도해 볼 수 있습니다. 요구 사항에 맞는 가장 초기 체크포인트를 사용하는 것이 좋습니다. 이들은 종종 분포 밖(OOD) 데이터에서 더 좋은 성능을 발휘합니다. |
Oops, something went wrong.