Re-enable TTS (bark.cpp) Inference #359
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR re-enables TTS (
bark.cpp
) components in the SDK by addressing previously known issues. The effect can be verified by runningtests/test_tts_generation.py
.Previous Problem with
bark.cpp
The issues with
bark.cpp
were caused by a shared library version mismatch:llama.cpp
generates alibggml
shared library and uses it as a dependency.bark.cpp
relies onencodec.cpp
, which includes a forked version of GGML. Whenbark.cpp
compilation is enabled, the forked version oflibggml
overwrites the one generated byllama.cpp
.libggml
is outdated and incompatible withllama.cpp
, causing runtime errors when loaded.Main Changes
Updated NexaAI's Forked
bark.cpp
:ggml
library carried bybark.cpp
fromlibggml
tolibggml-bark
(see this PR).bark.cpp
in Nexa SDK accordingly .Isolated Shared Libraries:
stable-diffusion
,llama
,bark.cpp
) into separate subfolders to prevent future naming conflicts.Shared Library Loading:
nexa/gguf/lib_utils.py
andnexa/gguf/bark/bark_cpp.py
to include an additional argument for specifying subdirectories mentioned in Change 2. The new argument carries a placeholder default value, ensuring backward compatibility.Fixed Broken Test Cases:
test_image_generation.py
.Testing
tests/
are passed.