https://github.com/balisujohn/tortoise.cpp

A ggml (C++) re-implementation of tortoise-tts

https://github.com/balisujohn/tortoise.cpp

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

ggml local speech text text-to-speech to tortoise-tts tts

Keywords from Contributors

transformer jax tensor vlm speech-recognition qwen pytorch-transformers pretrained-models model-hub glm
Last synced: 5 months ago · JSON representation

Repository

A ggml (C++) re-implementation of tortoise-tts

Basic Info
  • Host: GitHub
  • Owner: balisujohn
  • License: mit
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 42 MB
Statistics
  • Stars: 182
  • Watchers: 16
  • Forks: 17
  • Open Issues: 12
  • Releases: 0
Topics
ggml local speech text text-to-speech to tortoise-tts tts
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

tortoise.cpp: GGML implementation of tortoise-tts (Support Development Here!)

a menacing sea turtle in the ocean; mascot for tortoise.cpp

Downloading

clone the repository with the following command git clone --recursive https://github.com/balisujohn/tortoise.cpp.git

Compiling

For now, CUDA and CPU only. To compile:

Compile for CPU (works on Linux x86 and Mac ARM)

mkdir build cd build cmake .. make This is tested with mac os arm

Compile for CUDA

mkdir build cd build cmake .. -DGGML_CUBLAS=ON make This is tested with Ubuntu 22.04 and cuda 12.0 and a 1070ti

Compile for Mac OS with metal (work in-progress)

mkdir build cd build cmake .. -DGGML_METAL=ON make

Running

Only lowercase letters, spaces, and punctuation are supported in the prompt.

You will need to place ggml-model.bin, ggml-vocoder-model.bin and ggml-diffusion-model.bin in the models directory to run tortoise.cpp. You can download them here https://huggingface.co/balisujohn/tortoise-ggml. I will release scripts for generating these files from tortoise-tts.

From the build directory, run: ./tortoise here's an example that should work out of the box: ./tortoise --message "based... dr freeman?" --voice "../models/mouse.bin" --seed 0 --output "based?.wav" all command line arguments are optional:

arguments: --message Specifies the message to generate, lowercase letters, spaces, and punctuation only. (default: "this is a test message." ) --voice Specifies the path to the voice file to use to determine the speaker's voice. (default: "../models/mol.bin" ) --output Specifies the path where the generated wav file will be saved. (default: "./output.wav") --seed Specifies the seed for psuedorandom number generation, used in autoregressive sampling and diffusion sampling (default: system time seed)

How to add voices

set up the original tortoise-tts, then run it with whatever voice you have, then after this line: https://github.com/neonbjb/tortoise-tts/blob/e2d9fba0bb5c4376d0d142efea47a448f97c4d90/tortoise/api.py#L401

add this code: ```` numpyarray = autoconditioning.to("cpu").numpy().astype(np.float32) # Ensure float32 for binary format

Define the file path

filepath = 'autoconditioning.bin'

Save NumPy array as binary file

numpyarray.tofile(filepath)

print("saved auto conditioning") exit() ``` then you can renameauto_conditioning.binto the speaker name and put the file in your models folder to use it like any other voice. This works with voices clone withtortoise-tts`.

Contributing

If you want to contribute, please make an issue stating what you want to work on. DM me on twitter if you want a link to join the dev Discord, or if you have questions. I am happy to help get people get started with contributing!

I am also making available a fork of tortoise-tts which has my reverse engineering annotations, and also the export script for the autoregressive model.

License

This is released with an MIT License.

MIT License

Copyright (c) 2024 John Balis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Derived from tortoise-tts and ggml.

tortoise-tts:

Apache 2.0 License James Betker https://github.com/neonbjb/tortoise-tts/blob/main/LICENSE

GGML

MIT License

Copyright (c) 2022 Georgi Gerganov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Owner

  • Name: John Balis
  • Login: balisujohn
  • Kind: user

Pursuing a Doctorate of Computer Sciences at UW Madison. Interested in reinforcement learning. My focus is primarily sim2real RL for robotics.

GitHub Events

Total
  • Issues event: 1
  • Watch event: 35
  • Issue comment event: 3
  • Fork event: 3
Last Year
  • Issues event: 1
  • Watch event: 35
  • Issue comment event: 3
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 534
  • Total Committers: 81
  • Avg Commits per committer: 6.593
  • Development Distribution Score (DDS): 0.549
Past Year
  • Commits: 45
  • Committers: 2
  • Avg Commits per committer: 22.5
  • Development Distribution Score (DDS): 0.022
Top Committers
Name Email Commits
Georgi Gerganov g****v@g****m 241
John U. Balis p****s@g****m 114
Jiahao Li l****7@1****m 13
Borislav Stanimirov b****v@a****g 12
Yavor Ivanov y****v@v****m 8
slaren s****h@g****m 8
Cebtenzzre c****e@g****m 7
Radoslav Gerganov r****v@g****m 6
klosax 1****x 5
Sam Spilsbury s****z@g****m 5
Ravindra Marella m****a 5
PAB p****r@g****m 5
LoganDark g****t@l****m 4
ochafik o****k@g****m 4
sjinzh s****h@g****m 4
M. Yusuf Sarıgöz y****z@g****m 4
Andrei a****n@g****m 4
Eldar Yusupov e****v@g****m 3
Jakob Frick j****k@g****m 3
goerch j****r@t****e 3
leejet l****4@g****m 3
布客飞龙 5****9@q****m 2
the-crypt-keeper 8****r 2
katsu560 1****0 2
johnson442 5****2 2
jaeminSon w****d@g****m 2
Nouamane Tazi n****8@g****m 2
Michael Verrilli m****v@p****m 2
Lukas Möller m****l@l****h 2
LostRuins 3****s 2
and 51 more...

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 20
  • Total pull requests: 4
  • Average time to close issues: 21 days
  • Average time to close pull requests: 19 days
  • Total issue authors: 14
  • Total pull request authors: 3
  • Average comments per issue: 6.95
  • Average comments per pull request: 7.75
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 13
  • Pull requests: 4
  • Average time to close issues: 10 days
  • Average time to close pull requests: 19 days
  • Issue authors: 11
  • Pull request authors: 3
  • Average comments per issue: 9.77
  • Average comments per pull request: 7.75
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • balisujohn (3)
  • fakerybakery (2)
  • baileyheading (2)
  • dur-randir (2)
  • Kreijstal (1)
  • trappedinspacetime (1)
  • dridri (1)
  • candlewill (1)
  • jamislike (1)
  • JohnClaw (1)
  • patrickjonesdotca (1)
  • archit-spec (1)
  • DickyQi (1)
  • logikstate (1)
Pull Request Authors
  • dridri (2)
  • baileyheading (2)
  • ghost (2)
  • N0CTRON (2)
Top Labels
Issue Labels
good first issue (2)
Pull Request Labels

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
requirements.txt pypi
  • accelerate ==0.19.0
  • numpy ==1.24.3
  • sentencepiece ==0.1.98
  • torch ==2.0.1
  • torchaudio ==2.0.2
  • torchvision ==0.15.2
  • transformers ==4.29.2