8000 GitHub - watsy0007/kokoro: Elixir bindings to Kokoro-82M text-to-speech model
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

watsy0007/kokoro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kokoro

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

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

Or,

kokoro = Kokoro.new("/path/to/kokoro-v0_19.onnx", "/path/to/voices/directory")
{audio_tensor, _} = Kokoro.create_audio(kokoro, "Hello from Elixir", "af_nicole", 1.0)
wave_data = Kokoro.create_wave(audio_tensor)

TODO

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

MIT License. © Samrat Man Singh

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%
0