Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple-tts example #12261

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ else()
add_subdirectory(run)
add_subdirectory(simple)
add_subdirectory(simple-chat)
add_subdirectory(simple-tts)
add_subdirectory(speculative)
add_subdirectory(speculative-simple)
add_subdirectory(tokenize)
Expand Down
5 changes: 5 additions & 0 deletions examples/simple-tts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(TARGET llama-simple-tts)
add_executable(${TARGET} simple-tts.cpp)
install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE llama common ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_17)
13 changes: 13 additions & 0 deletions examples/simple-tts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# llama.cpp/example/simple-tts

The purpose of this example is to demonstrate a minimal usage of llama.cpp to generate speech from text using the outetts series of models.

## Usage

To use this example you will need the Text to Codes model [`OuteTTS-0.2-500M-q8_0.gguf`](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF/blob/main/OuteTTS-0.2-500M-Q8_0.gguf), the Wav Tokenizer model [`WavTokenizer-Large-75-F16.gguf`](https://huggingface.co/ggml-org/WavTokenizer/blob/main/WavTokenizer-Large-75-F16.gguf), and a [outetts voice file](https://github.com/edwko/OuteTTS/tree/main/outetts/version/v1/default_speakers).

Once you have the files you can run the following command to generate speech from text:

```bash
./llama-simple-tts -m ./OuteTTS-0.2-500M-q8_0.gguf -mv ./WavTokenizer-Large-75-F16.gguf -v ./en_male_1.json -p "Hello, world!"
```
Loading