GithubHelp home page GithubHelp logo

kaldi2scribe's Introduction

kaldi2scribe

This repo represents weeks of frustration and difficulty I faced while trying to run my trained Kaldi model. Yes, I aware of the fact that Kaldi is a tool that was developed for researchers but the undecipherable documentation is not justified.

Unless you have a deep grasp of how Kaldi and ASR in general works you'll be getting nowhere. If you've been in a similar situation where you've followed the notorious Kaldi for Dummies tutorial and finally want to reap the fruits of your labor and see audio being transcribed, you'd be out of luck. It's as if no one from Kaldi's team every wondered whether anyone would want to run their models and see it transcribe text. You'll find excellent resources like PyKaldi Examples or Nithing Rao's Medium article but again for someone who's just following Kaldi for Dummies they probably won't understand how to get them to work. Also given that a majority of the examples aren't for simple GMM setups but are based on running more complex TDNN or NN acoustic models, they aren't going to help the Kaldi for Dummies gang.

So I've made this small tool that takes in audio files, your model, and kaldi and spits out their transcriptions. I used Anwarvic's really well written Arabic-Speech-Recognition repo to guide me through writing it. It is basically his work that I've gutted to just spit out transcriptions instead of evaluating your model's accuracy.

Install

PyKaldi is available on conda, unless you plan on building it from scratch I'd highly recommend you use conda.

$ conda install --yes --file requirements.txt

You also need a copy of kaldi that's been built, if you've already trained a model then I guess you'll have a copy lying around. Just place the files this way:

kaldi2scribe.py
|
model root
└───exp
│   └───tri1
|   |   ...
kaldi root
└───nightmare fuel
|   |   ...

Tbh it doesn't really matter where everything is just make sure you CWD is at the same level as the Kaldi's root and yeah that's about it.

Usage

$ python3 kaldi2scribe.py --modelroot '/wsj/s5' --kaldiroot '/kaldi' --type 'tri1' --input '/transcription_test'

Help

$ python3 kaldi2scribe.py -h

Note

This is a very basic tool meant to help complete kaldi beginners to test their models, if you're looking at it for anything more then you're out of luck. If you have a better grasp on kaldi then make sure to contribute, specially to add support for more models.

kaldi2scribe's People

Contributors

taha-firoz avatar

Watchers

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