Skip to content

Commit

Permalink
Ver 1.4.3: deps, fish-audio-preprocess integrate
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyaCoder committed Nov 16, 2024
1 parent 172574a commit f0b2f42
Show file tree
Hide file tree
Showing 8 changed files with 574 additions and 807 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@ Info.plist
/*.wav
/*.flac
output/
*.exe
*.exe
fish_audio_preprocess
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
conda create -n pyqt python=3.10
conda activate pyqt
pip install pdm
# for windows nuitka build
pip install nuitka
pdm install
pdm sync
pdm run build.py
```

Expand All @@ -56,3 +54,17 @@ dist\fish.exe
# linux
dist/fish
```

## Tips

### Use FAP(Fish Audio Preprocess)

1. To install the dependencies for the **FAP Toolkit**, run the following command in this project root:

```bash
pip install -r extra-requirements.txt
```

2. Open the GUI and ensure the Python path is correctly configured to the Python environment where you ran the above command.

3. You are now ready to use the toolkit.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"--output-filename=fish",
"--include-data-dir=assets=assets",
"--include-data-dir=locales=locales",
"--include-data-files=fish_audio_preprocess=fish_audio_preprocess/=**/*.py",
"--windows-console-mode=disable",
"--enable-plugins=pkg-resources",
"--enable-plugins=pyqt6",
Expand Down
12 changes: 12 additions & 0 deletions extra-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tqdm>=4.64.1
demucs>=4.0.0
loguru>=0.6.0
pyloudnorm>=0.1.1
matplotlib>=3.6.2
librosa>=0.9.0
richuru>=0.1.1
praat-parselmouth>=0.4.3
click>=8.0.0
faster-whisper
funasr
modelscope
9 changes: 7 additions & 2 deletions fish/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,10 @@ async def send_message_async(self):

if self.state.added_sysaudio is False and len(self.system_audios) > 0:
self.state.added_sysaudio = True
sys_codes = [await agent.get_codes(audio) for audio in self.system_audios]
sys_codes = await asyncio.gather(
*[agent.get_codes(audio) for audio in self.system_audios]
)

for sys_code in sys_codes:
self.state.append_to_chat_ctx(
ServeVQPart(codes=sys_code), role="system"
Expand Down Expand Up @@ -922,7 +925,9 @@ def run(self):
is_voice_clickable=False,
voice_duration=12,
)
chat_widget.add_message("语音消息示例2", is_sender=False, is_voice=True, voice_duration=3)
chat_widget.add_message(
"语音消息示例2", is_sender=False, is_voice=True, voice_duration=3
)

chat_widget.show()

Expand Down
4 changes: 3 additions & 1 deletion fish/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ class Config:
llm_url: str = "http://localhost:8080/v1/chat"
proxy_url: str = "http://127.0.0.1:7890"

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

ref_id: str = ""
save_path: str = str(Path.cwd() / "output")
Expand Down
1,317 changes: 522 additions & 795 deletions pdm.lock

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fish-speech-gui"
version = "1.4.2"
version = "1.4.3"
description = "fish-speech comfortable GUI"
readme = "README.md"
requires-python = "<3.12,>=3.10"
Expand All @@ -17,14 +17,20 @@ classifiers = [

dependencies = [
"noisereduce>=2.0.1",
"sounddevice>=0.4.6",
"sounddevice==0.4.6",
"soundfile==0.12.1",
"pyaudio==0.2.14",
"pyyaml>=6.0",
"PyQt6>=6.5.0",
"PyQt6==6.5.0",
"pyqt6-qt6==6.5.1",
"pyqt6-sip==13.5.1",
"pyqtdarktheme==2.1.0",
"requests>=2.31.0",
"librosa==0.9.2",
"pydantic>=2.9.1",
"ormsgpack>=1.5.0",
"numpy==1.24.3",
"psutil>=6.1.0",
"loguru>=0.7.2",
]

[project.urls]
Expand All @@ -46,8 +52,9 @@ packages = { find = { include = ["fish*"], exclude = ["assets", "locales"] } }
dev = [
"isort>=5.12.0",
"black>=23.3.0",
"pytest>=7.3.1",
"pytest==7.3.1",
"pyinstaller>=5.11.0",
"nuitka>=2.4.11",
]

[build-system]
Expand Down

0 comments on commit f0b2f42

Please sign in to comment.