Skip to content
/ kokoro Public

Elixir bindings to Kokoro-82M text-to-speech model

Notifications You must be signed in to change notification settings

samrat/kokoro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kokoro

Elixir bindings to the Kokoro-82M text-to-speech model

Try the Livebook

The easiest way to try the library is to run the livebook here.

Usage

  • Add this library as a mix dependency:
# Hex package coming soon
{:kokoro, github: "samrat/kokoro"} 

Then,

kokoro = Kokoro.new("/path/to/kokoro-v0_19.onnx", "/path/to/voices/directory")
Kokoro.save_audio_to_file(kokoro, "Hello from Elixir", "af_nicole", 1.0, "/tmp/output.raw")

Convert raw audio to wav

❯ ffmpeg -f f32le -ar 24000 -ac 1 -i /tmp/output.raw /tmp/output.wav

TODO

  • Use espeak via NIF bindings(?)
  • [ ]

MIT License. © Samrat Man Singh

About

Elixir bindings to Kokoro-82M text-to-speech model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages