Giter VIP home page Giter VIP logo

espeak-phonemizer's Introduction

eSpeak Phonemizer

Uses ctypes and libespeak-ng to transform text into IPA phonemes.

Installation

First, install libespeak-ng:

sudo apt-get install libespeak-ng1

Next, install espeak_phonemizer:

pip install espeak_phonemizer

If installation was successful, you should be able to run:

espeak-phonemizer --version

Basic Phonemization

Simply pass your text into the standard input of espeak-phonemizer:

echo 'This is a test.' | espeak-phonemizer -v en-us
ðɪs ɪz ɐ tˈɛst

Separators

Phoneme and word separators can be changed:

echo 'This is a test.' | espeak-phonemizer -v en-us -p '_' -w '#'
ð_ɪ_s#ɪ_z#ɐ#t_ˈɛ_s_t

Punctuation and Stress

Some punctuation can be kept (.,;:!?) in the output:

echo 'This: is, a, test.' | espeak-phonemizer -v en-us --keep-punctuation
ðˈɪs: ˈɪz, ˈeɪ, tˈɛst.

Stress markers can also be dropped:

echo 'This is a test.' | espeak-phonemizer -v en-us --no-stress
ðɪs ɪz ɐ tɛst

Delimited Input

The --csv flag enables delimited input with fields separated by a '|' (change with --csv-delimiter):

echo 's1|This is a test.' | espeak-phonemizer -v en-us --csv
s1|This is a test.|ðɪs ɪz ɐ tˈɛst

Phonemes are added as a final column, allowing you to pass arbitrary metadata through to the output.

Parallelize with GNU Parallel

parallel -a /path/to/input.csv --pipepart \
    espeak-phonemizer -v en-us --csv \
    > /path/to/output.csv

espeak-phonemizer's People

Contributors

synesthesiam avatar artyom17 avatar msftcangoblowm 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.