GithubHelp home page GithubHelp logo

mariasmo / py-kaldi-simple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gooofy/py-kaldi-asr

3.0 1.0 0.0 229 KB

Some simple wrappers around kaldi-asr intended to make using kaldi's (online) decoders as convenient as possible.

License: Apache License 2.0

Makefile 4.17% Python 33.84% C++ 62.00%

py-kaldi-simple's Introduction

py-kaldi-simple

Some simple wrappers around kaldi-asr intended to make using kaldi's (online) decoders as convenient as possible.

Target audience are developers who would like to use kaldi-asr as-is for speech recognition in their application on GNU/Linux operating systems.

Constructive comments, patches and pull-requests are very welcome.

Example

Simple wav file decoding:

from kaldisimple.nnet3 import KaldiNNet3OnlineDecoder

MODELDIR    = 'data/models/kaldi-nnet3-voxforge-de-r20161117'
MODEL       = 'nnet_tdnn_a'
WAVFILE     = 'data/single.wav'

decoder = KaldiNNet3OnlineDecoder (MODELDIR, model)

if decoder.decode_wav_file(WAVFILE):

    print '%s decoding worked!' % model

    s = decoder.get_decoded_string()
    print
    print "*****************************************************************"
    print "**", s
    print "** %s likelihood:" % model, decoder.get_likelihood()
    print "*****************************************************************"
    print

else:
    print '%s decoding did not work :(' % model

Please check the examples directory for more example code.

Links

Requirements

Note: very incomplete.

  • Python 2.7 with numpy, ...
  • Cython
  • kaldi-asr

Setup Notes

At the time of this writing kaldi-asr does not seem to have an official way to install it on a system. So, for now you will have to modify the supplied Makefile and make sure the KALDI_ROOT variable points to wherever your kaldi checkout lives in your filesystem.

License

My own code is Apache licensed unless otherwise noted in the scritp's copyright headers.

Some scripts and files are based on works of others, in those cases it is my intention to keep the original license intact. Please make sure to check the copyright headers inside for more information.

Author

Guenter Bartsch [email protected]

py-kaldi-simple's People

Contributors

gooofy avatar mariasmo avatar

Stargazers

Lucía Ormaechea avatar x1ngchen avatar  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.