From f9671eaedfd1527d2b24f530479ab0d3fc51f567 Mon Sep 17 00:00:00 2001 From: Felix Lu <58391009+lumpinif@users.noreply.github.com> Date: Mon, 23 Nov 2026 03:36:23 -0800 Subject: [PATCH 1/2] fix: correct install package name to fish-audio-sdk The SDK is published on PyPI as `fish-audio-sdk` (import name `fishaudio`), but the examples and the sounddevice dependency hint told users to `pip install fishaudio`. That name on PyPI is an unrelated third-party package (fishaudio 0.0.5, "text-to-speech synthesis 2", by calcuis, github.com/calcuis/text-to-speech-synthesis-2), so following the instructions installed the wrong project. - examples: `pip install fishaudio` -> `pip install fish-audio-sdk` (README, getting-started scripts 01-03, getting_started.ipynb) - utils.play: DependencyError hint `fishaudio[utils]` -> `fish-audio-sdk[utils]`, and the matching test assertion Co-Authored-By: Claude Fable 5.2 --- examples/README.md | 2 +- examples/getting-started/01_simple_tts.py | 2 +- examples/getting-started/02_play_audio.py | 2 +- examples/getting-started/03_check_credits.py | 2 +- examples/getting_started.ipynb | 2 +- src/fishaudio/utils/play.py | 2 +- tests/unit/test_utils.py | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/README.md b/examples/README.md index 1132cd1..55d0ae0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,6 +4,6 @@ Example scripts demonstrating how to use the Fish Audio Python SDK. ```bash # Install and setup -pip install fishaudio +pip install fish-audio-sdk export FISH_API_KEY="your_api_key" ``` \ No newline at end of file diff --git a/examples/getting-started/01_simple_tts.py b/examples/getting-started/01_simple_tts.py index 0587a3f..bb83c64 100644 --- a/examples/getting-started/01_simple_tts.py +++ b/examples/getting-started/01_simple_tts.py @@ -7,7 +7,7 @@ - Save the audio to an MP3 file Requirements: - pip install fishaudio + pip install fish-audio-sdk Environment Setup: export FISH_API_KEY="your_api_key_here" diff --git a/examples/getting-started/02_play_audio.py b/examples/getting-started/02_play_audio.py index 34c8e29..8b8bc36 100644 --- a/examples/getting-started/02_play_audio.py +++ b/examples/getting-started/02_play_audio.py @@ -7,7 +7,7 @@ - Different playback methods (ffmpeg, sounddevice) Requirements: - pip install fishaudio + pip install fish-audio-sdk # For audio playback (choose one): # Option 1 (recommended): Install ffmpeg diff --git a/examples/getting-started/03_check_credits.py b/examples/getting-started/03_check_credits.py index 87412ec..3aaf90e 100644 --- a/examples/getting-started/03_check_credits.py +++ b/examples/getting-started/03_check_credits.py @@ -10,7 +10,7 @@ - Monitoring usage and remaining credits Requirements: - pip install fishaudio + pip install fish-audio-sdk Environment Setup: export FISH_API_KEY="your_api_key_here" diff --git a/examples/getting_started.ipynb b/examples/getting_started.ipynb index 2ae6cfb..3c39d46 100644 --- a/examples/getting_started.ipynb +++ b/examples/getting_started.ipynb @@ -22,7 +22,7 @@ "First, install the SDK and set your API key:\n", "\n", "```bash\n", - "pip install fishaudio\n", + "pip install fish-audio-sdk\n", "export FISH_API_KEY=\"your_api_key\"\n", "```\n", "\n", diff --git a/src/fishaudio/utils/play.py b/src/fishaudio/utils/play.py index 5973b24..da66465 100644 --- a/src/fishaudio/utils/play.py +++ b/src/fishaudio/utils/play.py @@ -94,7 +94,7 @@ def play( except ImportError: raise DependencyError( "sounddevice and soundfile", - "pip install 'fishaudio[utils]' # or\npip install sounddevice soundfile", + "pip install 'fish-audio-sdk[utils]' # or\npip install sounddevice soundfile", ) # Load and play audio diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 86f8b5b..5a4c37d 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -79,9 +79,9 @@ def test_play_sounddevice_not_installed(self): with pytest.raises(DependencyError) as exc_info: play(b"audio", use_ffmpeg=False) - assert "sounddevice" in str(exc_info.value) or "fishaudio[utils]" in str( + assert "sounddevice" in str( exc_info.value - ) + ) or "fish-audio-sdk[utils]" in str(exc_info.value) def test_play_notebook_not_installed(self): """Test error when IPython not available.""" From de4c68716af5e5a180501008cf40783f4a5b312c Mon Sep 17 00:00:00 2001 From: Felix Lu <58391009+lumpinif@users.noreply.github.com> Date: Mon, 23 Nov 2026 05:00:06 -0800 Subject: [PATCH 2/2] test: assert the install hint names fish-audio-sdk[utils] The sounddevice-missing test joined its two checks with `or`, and the error message always contains "sounddevice", so it passed regardless of which package the install hint named. Assert the dependency name and the `fish-audio-sdk[utils]` hint separately, and assert the old `fishaudio[utils]` spelling is gone. The test now fails if the hint is reverted to the old string. Co-Authored-By: Claude Fable 5.2 --- tests/unit/test_utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 5a4c37d..ccebad0 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -79,9 +79,11 @@ def test_play_sounddevice_not_installed(self): with pytest.raises(DependencyError) as exc_info: play(b"audio", use_ffmpeg=False) - assert "sounddevice" in str( - exc_info.value - ) or "fish-audio-sdk[utils]" in str(exc_info.value) + message = str(exc_info.value) + assert "sounddevice" in message + assert "fish-audio-sdk[utils]" in message + # `fishaudio` on PyPI is an unrelated package; the hint must not name it. + assert "fishaudio[utils]" not in message def test_play_notebook_not_installed(self): """Test error when IPython not available."""