From 45b82363cfc3c5aef64bacc16dee1049d4a7c9da Mon Sep 17 00:00:00 2001 From: zack Zhiyuan Li Date: Thu, 21 Nov 2024 18:12:20 +0000 Subject: [PATCH 1/2] disable bark.cpp from tts --- CMakeLists.txt | 3 ++- nexa/cli/entry.py | 6 ++++-- nexa/gguf/__init__.py | 6 ++++-- tests/test_tts_generation.py | 38 +++++++++++++++++++----------------- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1f28a3d..41738eb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,8 @@ if(LLAMA_BUILD) endif() # bark_cpp project -option(BARK_BUILD "Build bark.cpp" ON) +# Temporarily disabled since version v0.0.9.3 +option(BARK_BUILD "Build bark.cpp" OFF) if(BARK_BUILD) # Filter out HIPBLAS and Vulkan options for bark.cpp since it doesn't support them set(BARK_CMAKE_OPTIONS ${USER_DEFINED_OPTIONS}) diff --git a/nexa/cli/entry.py b/nexa/cli/entry.py index b4ea222d..52611a1c 100644 --- a/nexa/cli/entry.py +++ b/nexa/cli/entry.py @@ -120,8 +120,10 @@ def run_ggml_inference(args): from nexa.gguf.nexa_inference_voice import NexaVoiceInference inference = NexaVoiceInference(model_path=model_path, local_path=local_path, **kwargs) elif run_type == "TTS": - from nexa.gguf.nexa_inference_tts import NexaTTSInference - inference = NexaTTSInference(model_path=model_path, local_path=local_path, **kwargs) + # # Temporarily disabled since version v0.0.9.3 + raise NotImplementedError("TTS model is not supported in CLI mode.") + # from nexa.gguf.nexa_inference_tts import NexaTTSInference + # inference = NexaTTSInference(model_path=model_path, local_path=local_path, **kwargs) elif run_type == "AudioLM": from nexa.gguf.nexa_inference_audio_lm import NexaAudioLMInference inference = NexaAudioLMInference(model_path=model_path, local_path=local_path, **kwargs) diff --git a/nexa/gguf/__init__.py b/nexa/gguf/__init__.py index 9ba70de9..d2afff06 100644 --- a/nexa/gguf/__init__.py +++ b/nexa/gguf/__init__.py @@ -2,13 +2,15 @@ from .nexa_inference_text import NexaTextInference from .nexa_inference_vlm import NexaVLMInference from .nexa_inference_voice import NexaVoiceInference -from .nexa_inference_tts import NexaTTSInference + +# Temporarily disabled since version v0.0.9.3 +# from .nexa_inference_tts import NexaTTSInference __all__ = [ "NexaImageInference", "NexaTextInference", "NexaVLMInference", "NexaVoiceInference", - "NexaTTSInference", + #"NexaTTSInference", "NexaAudioLMInference" ] \ No newline at end of file diff --git a/tests/test_tts_generation.py b/tests/test_tts_generation.py index 5d55ed4d..2dc9c526 100644 --- a/tests/test_tts_generation.py +++ b/tests/test_tts_generation.py @@ -1,22 +1,24 @@ -from nexa.gguf import NexaTTSInference +# Temporarily disabled since version v0.0.9.3 -def test_tts_generation(): - tts = NexaTTSInference( - model_path="bark-small", - local_path=None, - n_threads=4, - seed=42, - sampling_rate=24000, - verbosity=2 - ) +# from nexa.gguf import NexaTTSInference + +# def test_tts_generation(): +# tts = NexaTTSInference( +# model_path="bark-small", +# local_path=None, +# n_threads=4, +# seed=42, +# sampling_rate=24000, +# verbosity=2 +# ) - # Generate audio from prompt - prompt = "Hello, this is a test of the Bark text to speech system." - audio_data = tts.audio_generation(prompt) +# # Generate audio from prompt +# prompt = "Hello, this is a test of the Bark text to speech system." +# audio_data = tts.audio_generation(prompt) - # Save the generated audio - tts._save_audio(audio_data, tts.sampling_rate, "tts_output") - print("TTS generation test completed successfully!") +# # Save the generated audio +# tts._save_audio(audio_data, tts.sampling_rate, "tts_output") +# print("TTS generation test completed successfully!") -if __name__ == "__main__": - test_tts_generation() \ No newline at end of file +# if __name__ == "__main__": +# test_tts_generation() \ No newline at end of file From 1e435f242c875dcd7974b135099ba807f3860ddb Mon Sep 17 00:00:00 2001 From: zack Zhiyuan Li Date: Thu, 21 Nov 2024 18:13:02 +0000 Subject: [PATCH 2/2] add CPU prebuild wheel indexing --- .github/workflows/generate-index-from-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-index-from-release.yaml b/.github/workflows/generate-index-from-release.yaml index 11741cab..b993847a 100644 --- a/.github/workflows/generate-index-from-release.yaml +++ b/.github/workflows/generate-index-from-release.yaml @@ -3,7 +3,7 @@ name: Wheels Index on: # Trigger on new release workflow_run: - workflows: ["Release", "Build Wheels (CUDA)", "Build Wheels (Metal)", "Build Wheels (ROCm)", "Build Wheels (Vulkan)"] + workflows: ["Build Wheels (CPU)", "Build Wheels (CUDA)", "Build Wheels (Metal)", "Build Wheels (ROCm)", "Build Wheels (Vulkan)"] types: - completed