Coder Social home page Coder Social logo

dimits's Introduction

Dimits - Python Bindings for Piper TTS

Dimits is a Python library that provides an easy-to-use interface to the Piper text-to-speech (TTS) system. It utilizes the powerful Piper TTS engine, which is optimized for Raspberry Pi 4, to generate high-quality synthesized speech.

Features

  • Simple Python bindings for Piper TTS
  • Support for multiple languages and voices
  • Compatible with Raspberry Pi 3/4 and desktop Linux systems

Installation ๐Ÿ“ฅ

You can install Dimits via pip:

pip install dimits

This will automatically install the necessary dependencies

Quick Start ๐Ÿƒ๐Ÿปโ€โ™€๏ธ

Here's a simple example of using Dimits to synthesize speech:

from dimits import Dimits

# Initialize Dimits with the desired voice model
dt = Dimits("en_US-amy-low")

# Convert text to audio and play it using the aplay engine
dt.text_2_speech("Hello World", engine="aplay")

Voices ๐Ÿ”Š

Dimits supports all the voices available in the Piper TTS system. To use a specific voice, simply provide corresponding .onnx file namepo initializing the Dimits class.

For a list of available voices and their download links, refer to the Piper TTS repository.

Usage ๐Ÿ“ƒ

Initializing Dimits

To use Dimits, first create an instance of the Dimits class, providing the path to the desired voice model:

from dimits import Dimits

dt = Dimits("en_US-amy-low")

Synthesizing Speech

To synthesize speech and play on the go, simply call the text_2_speech method, providing the text to be synthesized and the desired engine:

dt.text_2_speech("This is a test.",engine='aplay')

on other hand to synthesize speech and save it to the file, call text_2_audio_file finction providing file_name dir and format

dt.text_2_audio_file("Hello World", "hello_world", "/path/to/output/directory/", format="wav")

Changing Voices

To change the voice used for synthesis, create a new instance of the Dimits class with the desired voice model:

# dt = Dimits("en_US-amy-low")
dt = Dimits("en_US-danny-low")

TODO ๐Ÿ“

  • Implement windows compatible executible to run the voice models
  • Support for multiple audio player engine
  • Benchmark
  • Documentation

License ๐Ÿชช

This project is licensed under the MIT License.

Acknowledgements

Dimits is based on the work of the Piper project by Rhasspy, and is made possible by the contributions of its developers and the open source community. Without their hard work and dedication, this project would not be possible.

dimits's People

Contributors

reqeique avatar redromnon avatar robonxt-ai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.