From 3f1e639de448da5558a63f2f85a9159ed1cd2d0f Mon Sep 17 00:00:00 2001 From: AnyaCoder Date: Sat, 19 Oct 2024 10:30:35 +0800 Subject: [PATCH 1/3] Linux pyaudio dependencies --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++++ .github/ISSUE_TEMPLATE/feature_request.yml | 3 +++ docs/en/index.md | 15 ++++++++++++--- docs/ja/index.md | 14 ++++++++++++-- docs/pt/index.md | 15 ++++++++++++--- docs/zh/index.md | 15 ++++++++++++--- tools/llama/generate.py | 2 ++ 7 files changed, 57 insertions(+), 11 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 131480d9..198d868b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -10,6 +10,10 @@ body: options: - label: This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/fishaudio/fish-speech/discussions). required: true + - label: I have thoroughly reviewed the project documentation, including the sections on installation, training, \ + and inference, but I couldn't find any relevant information to solve my problem. \ + [English](https://speech.fish.audio/)[中文](https://speech.fish.audio/zh/)[日本語](https://speech.fish.audio/ja/)[Portuguese (Brazil)](https://speech.fish.audio/pt/) + required: true - label: I have searched for existing issues [search for existing issues](https://github.com/fishaudio/fish-speech/issues), including closed ones. required: true - label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/fishaudio/fish-speech/issues/515)). diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 4f4eee90..90a06507 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,6 +8,9 @@ body: label: Self Checks description: "To make sure we get to you in time, please check the following :)" options: + - label: I have thoroughly reviewed the project documentation, including the sections on installation, training, and inference, but I couldn't find any relevant information that meets my needs. \ + [English](https://speech.fish.audio/)[中文](https://speech.fish.audio/zh/)[日本語](https://speech.fish.audio/ja/)[Portuguese (Brazil)](https://speech.fish.audio/pt/) + required: true - label: I have searched for existing issues [search for existing issues]([https://github.com/langgenius/dify/issues](https://github.com/fishaudio/fish-speech/issues)), including closed ones. required: true - label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/fishaudio/fish-speech/issues/515)). diff --git a/docs/en/index.md b/docs/en/index.md index 4d9ca8c0..cb57b775 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -94,6 +94,7 @@ Non-professional Windows users can consider the following basic methods to run t ## Linux Setup +See [pyproject.toml](../../pyproject.toml) for details. ```bash # Create a python 3.10 virtual environment, you can also use virtualenv conda create -n fish-speech python=3.10 @@ -102,11 +103,19 @@ conda activate fish-speech # Install pytorch pip3 install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 +# (Ubuntu / Debian User) Install sox + ffmpeg +apt install libsox-dev ffmpeg + +# (Ubuntu / Debian User) Install pyaudio +apt install build-essential \ + cmake \ + libasound-dev \ + portaudio19-dev \ + libportaudio2 \ + libportaudiocpp0 + # Install fish-speech pip3 install -e .[stable] - -# (Ubuntu / Debian User) Install sox + ffmpeg -apt install libsox-dev ffmpeg ``` ## macos setup diff --git a/docs/ja/index.md b/docs/ja/index.md index d37d8185..7c5ad2ec 100644 --- a/docs/ja/index.md +++ b/docs/ja/index.md @@ -92,6 +92,7 @@ pip install https://github.com/AnyaCoder/fish-speech/releases/download/v0.1.0/tr ## Linux セットアップ +詳細については、[pyproject.toml](../../pyproject.toml) を参照してください。 ```bash # python 3.10の仮想環境を作成します。virtualenvも使用できます。 conda create -n fish-speech python=3.10 @@ -100,11 +101,20 @@ conda activate fish-speech # pytorchをインストールします。 pip3 install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 +# (Ubuntu / Debianユーザー) sox + ffmpegをインストールします。 +apt install libsox-dev ffmpeg + +# (Ubuntu / Debianユーザー) pyaudio をインストールします。 +apt install build-essential \ + cmake \ + libasound-dev \ + portaudio19-dev \ + libportaudio2 \ + libportaudiocpp0 + # fish-speechをインストールします。 pip3 install -e .[stable] -# (Ubuntu / Debianユーザー) sox + ffmpegをインストールします。 -apt install libsox-dev ffmpeg ``` ## macos setup diff --git a/docs/pt/index.md b/docs/pt/index.md index 5f221489..05e27ff7 100644 --- a/docs/pt/index.md +++ b/docs/pt/index.md @@ -90,6 +90,7 @@ Usuários não profissionais do Windows podem considerar os seguintes métodos b ## Configuração para Linux +Para mais detalhes, consulte [pyproject.toml](../../pyproject.toml). ```bash # Crie um ambiente virtual python 3.10, você também pode usar virtualenv conda create -n fish-speech python=3.10 @@ -98,11 +99,19 @@ conda activate fish-speech # Instale o pytorch pip3 install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 -# Instale o fish-speech -pip3 install -e .[stable] - # Para os Usuário do Ubuntu / Debian: Instale o sox + ffmpeg apt install libsox-dev ffmpeg + +# Para os Usuário do Ubuntu / Debian: Instale o pyaudio +apt install build-essential \ + cmake \ + libasound-dev \ + portaudio19-dev \ + libportaudio2 \ + libportaudiocpp0 + +# Instale o fish-speech +pip3 install -e .[stable] ``` ## Configuração para macos diff --git a/docs/zh/index.md b/docs/zh/index.md index 8d7e3e47..e6c15961 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -89,6 +89,7 @@ Windows 非专业用户可考虑以下为免 Linux 环境的基础运行方法 ## Linux 配置 +有关详细信息,请参见 [pyproject.toml](../../pyproject.toml)。 ```bash # 创建一个 python 3.10 虚拟环境, 你也可以用 virtualenv conda create -n fish-speech python=3.10 @@ -97,11 +98,19 @@ conda activate fish-speech # 安装 pytorch pip3 install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 -# 安装 fish-speech -pip3 install -e .[stable] - # (Ubuntu / Debian 用户) 安装 sox + ffmpeg apt install libsox-dev ffmpeg + +# (Ubuntu / Debian 用户) 安装 pyaudio +apt install build-essential \ + cmake \ + libasound-dev \ + portaudio19-dev \ + libportaudio2 \ + libportaudiocpp0 + +# 安装 fish-speech +pip3 install -e .[stable] ``` ## macos 配置 diff --git a/tools/llama/generate.py b/tools/llama/generate.py index 93ec1d91..464b6816 100644 --- a/tools/llama/generate.py +++ b/tools/llama/generate.py @@ -544,6 +544,8 @@ def generate_long( yield GenerateResponse(action="sample", codes=codes, text=texts[seg_idx]) seg_idx += 1 + if torch.cuda.is_available(): + torch.cuda.synchronize() # This indicates the end of the current sample yield GenerateResponse(action="next") From 95396fce467493e6d95ae30dd9b2323dadd1264f Mon Sep 17 00:00:00 2001 From: AnyaCoder Date: Sat, 19 Oct 2024 10:32:40 +0800 Subject: [PATCH 2/3] revert generate.py --- tools/llama/generate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/llama/generate.py b/tools/llama/generate.py index 464b6816..93ec1d91 100644 --- a/tools/llama/generate.py +++ b/tools/llama/generate.py @@ -544,8 +544,6 @@ def generate_long( yield GenerateResponse(action="sample", codes=codes, text=texts[seg_idx]) seg_idx += 1 - if torch.cuda.is_available(): - torch.cuda.synchronize() # This indicates the end of the current sample yield GenerateResponse(action="next") From a6481cb3a3b008f6695343cfc2802c0bc722de78 Mon Sep 17 00:00:00 2001 From: AnyaCoder Date: Sat, 19 Oct 2024 10:44:45 +0800 Subject: [PATCH 3/3] Better bug report & feat request --- .github/ISSUE_TEMPLATE/bug_report.yml | 37 ++++++++++++-------- .github/ISSUE_TEMPLATE/feature_request.yml | 39 +++++++++++++++++----- 2 files changed, 53 insertions(+), 23 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 198d868b..8dc4ea10 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,26 +1,26 @@ name: "🕷️ Bug report" -description: Report errors or unexpected behavior +description: | + Please follow this template carefully to ensure we can address your issue quickly. + Make sure to provide as much detail as possible, including logs and screenshots. labels: - bug body: - type: checkboxes attributes: label: Self Checks - description: "To make sure we get to you in time, please check the following :)" + description: "To ensure timely help, please confirm the following:" options: - - label: This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/fishaudio/fish-speech/discussions). + - label: This template is only for bug reports. For questions, please visit [Discussions](https://github.com/fishaudio/fish-speech/discussions). required: true - - label: I have thoroughly reviewed the project documentation, including the sections on installation, training, \ - and inference, but I couldn't find any relevant information to solve my problem. \ - [English](https://speech.fish.audio/)[中文](https://speech.fish.audio/zh/)[日本語](https://speech.fish.audio/ja/)[Portuguese (Brazil)](https://speech.fish.audio/pt/) + - label: I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. [English](https://speech.fish.audio/) [中文](https://speech.fish.audio/zh/) [日本語](https://speech.fish.audio/ja/) [Portuguese (Brazil)](https://speech.fish.audio/pt/) required: true - - label: I have searched for existing issues [search for existing issues](https://github.com/fishaudio/fish-speech/issues), including closed ones. + - label: I have searched for existing issues, including closed ones. [Search issues](https://github.com/fishaudio/fish-speech/issues) required: true - label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/fishaudio/fish-speech/issues/515)). required: true - label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)" required: true - - label: "Please do not modify this template :) and fill in all the required fields." + - label: "Please do not modify this template and fill in all required fields." required: true - type: dropdown attributes: @@ -34,21 +34,30 @@ body: required: true - type: textarea attributes: - label: Steps to reproduce - description: We highly suggest including screenshots and a bug report log. Please use the right markdown syntax for code blocks. - placeholder: Having detailed steps helps us reproduce the bug. + label: Environment Details + description: "Provide details such as OS, Python version, and any relevant software or dependencies." + placeholder: e.g., macOS 13.5, Python 3.10, torch==2.4.1, Gradio 4.44.0 + validations: + required: true + - type: textarea + attributes: + label: Steps to Reproduce + description: | + Include detailed steps, screenshots, and logs. Use the correct markdown syntax for code blocks. + placeholder: | + 1. Run the command `python -m tools.post_api -t "xxxxx"` + 2. Observe the console output error: `ModuleNotFoundError: No module named 'pyaudio'` (with screenshots or logs will be better) validations: required: true - type: textarea attributes: label: ✔️ Expected Behavior - placeholder: What were you expecting? + placeholder: Describe what you expected to happen. validations: required: false - - type: textarea attributes: label: ❌ Actual Behavior - placeholder: What happened instead? + placeholder: Describe what actually happened. validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 90a06507..e9fadbb1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,8 +8,7 @@ body: label: Self Checks description: "To make sure we get to you in time, please check the following :)" options: - - label: I have thoroughly reviewed the project documentation, including the sections on installation, training, and inference, but I couldn't find any relevant information that meets my needs. \ - [English](https://speech.fish.audio/)[中文](https://speech.fish.audio/zh/)[日本語](https://speech.fish.audio/ja/)[Portuguese (Brazil)](https://speech.fish.audio/pt/) + - label: I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find any relevant information that meets my needs. [English](https://speech.fish.audio/) [中文](https://speech.fish.audio/zh/) [日本語](https://speech.fish.audio/ja/) [Portuguese (Brazil)](https://speech.fish.audio/pt/) required: true - label: I have searched for existing issues [search for existing issues]([https://github.com/langgenius/dify/issues](https://github.com/fishaudio/fish-speech/issues)), including closed ones. required: true @@ -19,25 +18,47 @@ body: required: true - label: "Please do not modify this template :) and fill in all the required fields." required: true + - type: textarea attributes: - label: 1. Is this request related to a challenge you're experiencing? Tell me about your story. - placeholder: Please describe the specific scenario or problem you're facing as clearly as possible. For instance "I was trying to use [feature] for [specific task], and [what happened]... It was frustrating because...." + label: 1. Is this request related to a challenge you're experiencing? Tell us your story. + description: | + Describe the specific problem or scenario you’re facing in detail. For example: + *"I was trying to use [feature] for [specific task], but encountered [issue]. This was frustrating because...."* + placeholder: Please describe the situation in as much detail as possible. validations: required: true + - type: textarea attributes: - label: 2. Additional context or comments - placeholder: (Any other information, comments, documentations, links, or screenshots that would provide more clarity. This is the place to add anything else not covered above.) + label: 2. What is your suggested solution? + description: | + Provide a clear description of the feature or enhancement you'd like to propose. + How would this feature solve your issue or improve the project? + placeholder: Describe your idea or proposed solution here. + validations: + required: true + + - type: textarea + attributes: + label: 3. Additional context or comments + description: | + Any other relevant information, links, documents, or screenshots that provide clarity. + Use this section for anything not covered above. + placeholder: Add any extra details here. validations: required: false + - type: checkboxes attributes: - label: 3. Can you help us with this feature? - description: Let us know! This is not a commitment, but a starting point for collaboration. + label: 4. Can you help us with this feature? + description: | + Let us know if you're interested in contributing. This is not a commitment but a way to express interest in collaboration. options: - label: I am interested in contributing to this feature. required: false + - type: markdown attributes: - value: Please limit one request per issue. + value: | + **Note:** Please submit only one request per issue to keep discussions focused and manageable.