Coder Social home page Coder Social logo

iamjesse98 / acoustic-model-machine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from noopkat/acoustic-model-machine

0.0 1.0 0.0 18 KB

๐Ÿ—จ๐ŸŽ™๐Ÿ“š generate acoustic model adaptation datasets for Custom Speech Service

License: MIT License

JavaScript 100.00%

acoustic-model-machine's Introduction

Acoustic Model Machine

This package can help you put together a dataset for training a custom acoustic adaptation model for Microsoft's Custom Speech Service.

It does so by using a video / audio file with matching subtitles to extract short passages of speech. These passages are saved to disk in the correct audio format needed. It'll then generate a transcription text file in the exact format required by Custom Speech Service. See the official Custom Speech Service documentation for more details on acoustic adaptation model datasets.

My favourite captioning service to request subtitle files from is Rev; I highly recommend their amazing people to caption your content!

gif of command line tool working

Installation

Firstly, install NodeJS on your operating system.
You'll also need to have ffmpeg installed. Windows can be tricky in particular; this guide is a good one.

Then, in your favourite terminal application, type the following:

npm install -g acoustic-model-machine

Usage

acoustic-model-machine --source=/path/to/audio.wav --subtitle=/path/to/subtitle.srt --output-dir=mydatasetdir

Options

  • --source required - the path to the source file containing the speech you want to extract.
  • --subtitle required - the path to the subtitle file that matches the source audio file. Requires .srt format.
  • --output-dir optional - the path to where you'd like the dataset saved to. Default is the current working directory.
  • --output-prefix optional - a custom prefix for the audio extraction files. Default is speech. See below section for output example.
  • --verbose optional - see more verbose logging output when generating a dataset.

Output

The completed dataset output will have the following structure:

mydatasetdir/
โ”œโ”€โ”€ audio
โ”‚ย ย  โ”œโ”€โ”€ speech000001.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000002.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000003.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000004.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000005.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000006.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000007.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000008.wav
โ”‚ย ย  โ”œโ”€โ”€ speech000009.wav
โ”‚ย ย  โ””โ”€โ”€ speech000010.wav
โ””โ”€โ”€ transcription.txt

Importing the acoustic adaptation dataset into Custom Speech Service

  1. Compress all audio files in the dataset into a flat zip file.
  2. Follow the official documentation to import.

Roadmap

  • Importing of subtitles directly embedded in the source. For now, this needs to be performed manually with ffmpeg before using this tool.
  • Notice anything else missing? File an issue ๐Ÿ˜„

License

MIT.

acoustic-model-machine's People

Contributors

noopkat 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.