Giter VIP home page Giter VIP logo

bangla-tts's Introduction

bangla-tts

Multilingual (Bangla, English) real-time ([almost] in a GPU) speech synthesis library

Installation

  • Install Anaconda
  • conda create -n new_virtual_env python==3.6.8
  • conda activate new_virtual_env
  • pip install -r requirements.txt
  • While running for the first time, keep your internet connection on to download the weights of the speech synthesis models (>500 MB)

Usage

'''
function: generate(text_arr = [""], save_path = None)
arguments: 
text_arr (array) : an array of strings
save_path (string, optional) : location where generated wav files will be stored if save_path is not None, if the path is not valid, the wav files will be saved in current directory
returns:
if save_path is None, instead of saving an array of tuples containing geenrated speech signals and the sampling rate will be returned
if save_path is not None, then a list containing the file paths (relative) will be returned
'''

from bangla_tts import generate

# usage 1 (saving to path)

file_names = generate(["আমার সোনার বাংলা আমি তোমাকে ভালোবাসি"], save_path = "static") # will be saved to static folder
print(file_names)

# usage 2 (getting numpy arrays for the signals)

gen_wavs = generate(["আমার সোনার বাংলা আমি তোমাকে ভালোবাসি"]) # will return an array containing the speech and sampling rate
print(gen_wavs[0])
print(f"signal length: {gen_wavs[0][0].shape}")
print(f"samplign rate: {gen_wavs[0][1]}")

Generated unseen speech samples

Sample 1 (আমার সোনার বাংলা আমি তোমাকে ভালোবাসি)

Sample 2 (আমার নাম জাবির আল নাজি নাবিল)

Sample 3 (I am still not a great speaker)

Sample 4 (This is just a test)

To-dos

  • PyPI
  • More training
  • Light model
  • Publish the restful API
  • Publish the flask app

Usage granted only for educational/non-commerial purposes so far, ** GPL License **

If this repository helps you in anyway, show your love ❤️ by putting a ⭐ on this project ✌️

bangla-tts's People

Contributors

zabir-nabil avatar

Watchers

 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.