Giter Club home page Giter Club logo

gradle-marytts-kaldi-mfa-plugin's Introduction

License: LGPL v3 Build Status

gradle-marytts-kaldi-mfa-plugin

This plugin uses the Kaldi-based Montreal Forced Aligner to phonetically segment audio data based on corresponding text files. It uses MaryTTS to predict the text pronunciation.

Prerequisites

In your project directory, place the audio and text files under your build directory like this:

build
├── text
│   ├── utt0001.txt
│   ├── utt0002.txt
│   ├── utt0003.txt
│   ├── utt0004.txt
│   └── utt0005.txt
└── wav
    ├── utt0001.wav
    ├── utt0002.wav
    ├── utt0003.wav
    ├── utt0004.wav
    └── utt0005.wav

The wav files have to be downsampled to 16 kHz (we recommend using SoX for this).

Linux note

If you are on a linux system, ensure that the libcblas.so.3 file is on the library search path, since it is not bundled with the Linux release of Montreal Forced Aligner. For details, see the installation notes.

We hope that this issue is resolved in a future release; until then you can install the missing library by running

sudo apt-get install libatlas3-base

on Debian-based distributions (such as Ubuntu).

How to apply this plugin

Please see the instructions at https://plugins.gradle.org/plugin/de.dfki.mary.voicebuilding.marytts-kaldi-mfa

How to configure your project

To customize the directories configured as input for the forced alignment, you can override them like this in the project's build.gradle:

convertTextToMaryXml {
    srcDir = file("some/other/text/directory")
}
prepareForcedAlignment {
    wavDir =  file("$buildDir/wav")
}

How to run the forced alignement

Run

./gradlew runForcedAlignment

after which the resulting TextGrid files will be under build/TextGrid.

Optional post-processing

In order to use the TextGrids for voicebuilding with MaryTTS you have to replace the sil and sp labels with _ and convert them to lab files in Xwaves format.

This can be done simply by running

./gradlew convertTextGridToXLab

Note that you can also override the label mapping:

convertTextGridToXLab {
    labelMapping = [sil: 'pau', a: 'ah'] // etc.
}

Using convertTextGridToXLab alone

If you want to use convertTextGridToXLab alone you may want to override the default TextGrid-directory which is build/TextGrid/forcedAlignment:

convertTextGridToXLab.tgDir = file("$buildDir/TextGrid")

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.