Code Monkey home page Code Monkey logo

pyhtk's Introduction

PyHTK

HTK features in Python

This project contains a Python implementation of the MFCC features as computed by HTK.

What is HTK?

HTK is a respected toolkit used mainly by the speech community to perform research in speech recognition. Although quite old, many newer systems emulate the same feature extraction pipeline as used in HTK. Besides being thouroughly tested it is also well documented in a manual known as the HTK Book.

You can find more information about HTK on their official website: http://htk.eng.cam.ac.uk/

What is MFCC?

The MFCC feature set, as implemented in this little project, is one of the best performing techniques for modeling speech in tasks like speech recognition. While there may be others that are margianlly better in specific cases, MFCCs remain as a strong baseline for many standard benchmarks.

How to use?

Simply copy the HTKFeat.py file to your project and use the MFCC_HTK class from within. The class is throughly documented.

The HTK.py file isn't neccessary, but if you want, you can use it to compute the same features using the HCopy program which is a part of HTK.

For a demonstration of its use, take a look at the contents of the python-test directory.

How does it work?

Open the HTKFeaturesExplained notebook in the python-notebooks folder and play around with it. Everythin is explained there.

Who made this?

If you have any questions, feel free to contact me at: [email protected]

pyhtk's People

Contributors

danijel3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyhtk's Issues

Usage with different configuration

The example uses the following parameters in configuration:
TARGETKIND = MFCC_D_A_0 LOFREQ = 80 HIFREQ = 7500 ENORMALISE = FALSE ESCALE = 1.0
The lofreq, hifreq values are also hardcoded in gen_list.c.

I would like to use MFCC_E_D_A_Z and the default HTK values for LOFREQ (??), HIFREQ (??), ENORMALISE (T), ESCALE (0.1). Can you provide some guidelines?

I find this project very useful, thanks a lot for sharing.

Loading MFCC (.mfc HTK generated file)

Hi! Congrats for your work, it is superb.
I am trying to load a .mfc file generated by HTK Tools, and when I do this:

from HTK import HTKFile
htk = HTKFile()
htk.load('devel_0001.mfc')

The following error shows up: Traceback (most recent call last):
File "/Users/PycharmProjects/speech_mfcc/test2.py", line 5, in
htk.load('j_htk/devel_0001.mfc')
File "/Users/PycharmProjects/speech_mfcc/HTK.py", line 142, in load
s = f.read(self.nFeatures * 4)
ValueError: read length must be positive or -1

Am I missing something?
Thanks!

store features

how to store features to 123jf.mfcc file in htk format

Filter Weights Questions

Hello,

Thank you for publishing your work. I have a question question in regard to gen_filt.c
so if i change frame size and stride to
int frameSize=44100;
long sampPeriod=22050;
which is equivalent to 1000 ms frame size, 500ms off set, for 44100 sample per seconds.
The the gen_filt.c failed to generate the correct triangular weights. Can you be so kind of point me to the right direction?

Thank you so much

Loc

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.