Skip to content

Commit f0b2f42

Browse files
committed
Ver 1.4.3: deps, fish-audio-preprocess integrate
1 parent 172574a commit f0b2f42

8 files changed

Lines changed: 574 additions & 807 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,5 @@ Info.plist
169169
/*.wav
170170
/*.flac
171171
output/
172-
*.exe
172+
*.exe
173+
fish_audio_preprocess

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
conda create -n pyqt python=3.10
3535
conda activate pyqt
3636
pip install pdm
37-
# for windows nuitka build
38-
pip install nuitka
39-
pdm install
37+
pdm sync
4038
pdm run build.py
4139
```
4240

@@ -56,3 +54,17 @@ dist\fish.exe
5654
# linux
5755
dist/fish
5856
```
57+
58+
## Tips
59+
60+
### Use FAP(Fish Audio Preprocess)
61+
62+
1. To install the dependencies for the **FAP Toolkit**, run the following command in this project root:
63+
64+
```bash
65+
pip install -r extra-requirements.txt
66+
```
67+
68+
2. Open the GUI and ensure the Python path is correctly configured to the Python environment where you ran the above command.
69+
70+
3. You are now ready to use the toolkit.

build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"--output-filename=fish",
2929
"--include-data-dir=assets=assets",
3030
"--include-data-dir=locales=locales",
31+
"--include-data-files=fish_audio_preprocess=fish_audio_preprocess/=**/*.py",
3132
"--windows-console-mode=disable",
3233
"--enable-plugins=pkg-resources",
3334
"--enable-plugins=pyqt6",

extra-requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tqdm>=4.64.1
2+
demucs>=4.0.0
3+
loguru>=0.6.0
4+
pyloudnorm>=0.1.1
5+
matplotlib>=3.6.2
6+
librosa>=0.9.0
7+
richuru>=0.1.1
8+
praat-parselmouth>=0.4.3
9+
click>=8.0.0
10+
faster-whisper
11+
funasr
12+
modelscope

fish/chat.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,10 @@ async def send_message_async(self):
830830

831831
if self.state.added_sysaudio is False and len(self.system_audios) > 0:
832832
self.state.added_sysaudio = True
833-
sys_codes = [await agent.get_codes(audio) for audio in self.system_audios]
833+
sys_codes = await asyncio.gather(
834+
*[agent.get_codes(audio) for audio in self.system_audios]
835+
)
836+
834837
for sys_code in sys_codes:
835838
self.state.append_to_chat_ctx(
836839
ServeVQPart(codes=sys_code), role="system"
@@ -922,7 +925,9 @@ def run(self):
922925
is_voice_clickable=False,
923926
voice_duration=12,
924927
)
925-
chat_widget.add_message("语音消息示例2", is_sender=False, is_voice=True, voice_duration=3)
928+
chat_widget.add_message(
929+
"语音消息示例2", is_sender=False, is_voice=True, voice_duration=3
930+
)
926931

927932
chat_widget.show()
928933

fish/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ class Config:
2626
llm_url: str = "http://localhost:8080/v1/chat"
2727
proxy_url: str = "http://127.0.0.1:7890"
2828

29-
system_prompt: str = 'You are a voice assistant created by Fish Audio, offering end-to-end\
29+
system_prompt: str = (
30+
'You are a voice assistant created by Fish Audio, offering end-to-end\
3031
voice interaction for a seamless user experience. You are required to first transcribe\
3132
the user\'s speech, then answer it in the following format: "Question: [USER_SPEECH]\n\
3233
\nResponse: [YOUR_RESPONSE]\n"\u3002You are required to use the following voice\
3334
in this conversation.'
35+
)
3436

3537
ref_id: str = ""
3638
save_path: str = str(Path.cwd() / "output")

pdm.lock

Lines changed: 522 additions & 795 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fish-speech-gui"
3-
version = "1.4.2"
3+
version = "1.4.3"
44
description = "fish-speech comfortable GUI"
55
readme = "README.md"
66
requires-python = "<3.12,>=3.10"
@@ -17,14 +17,20 @@ classifiers = [
1717

1818
dependencies = [
1919
"noisereduce>=2.0.1",
20-
"sounddevice>=0.4.6",
20+
"sounddevice==0.4.6",
21+
"soundfile==0.12.1",
22+
"pyaudio==0.2.14",
2123
"pyyaml>=6.0",
22-
"PyQt6>=6.5.0",
24+
"PyQt6==6.5.0",
25+
"pyqt6-qt6==6.5.1",
26+
"pyqt6-sip==13.5.1",
2327
"pyqtdarktheme==2.1.0",
2428
"requests>=2.31.0",
25-
"librosa==0.9.2",
2629
"pydantic>=2.9.1",
2730
"ormsgpack>=1.5.0",
31+
"numpy==1.24.3",
32+
"psutil>=6.1.0",
33+
"loguru>=0.7.2",
2834
]
2935

3036
[project.urls]
@@ -46,8 +52,9 @@ packages = { find = { include = ["fish*"], exclude = ["assets", "locales"] } }
4652
dev = [
4753
"isort>=5.12.0",
4854
"black>=23.3.0",
49-
"pytest>=7.3.1",
55+
"pytest==7.3.1",
5056
"pyinstaller>=5.11.0",
57+
"nuitka>=2.4.11",
5158
]
5259

5360
[build-system]

0 commit comments

Comments
 (0)