HMMGradients.jl

A first step towards a Julia-based speech recognition toolkit.

Most speech recognition toolkits are built on multiple programming languages: Bash, Python, C++ and sometimes even Perl! The reason for this is well known, different programming languages have different features which are more suited for particular tasks. This issue is also known as the two-programming language problem. For example, Python has a user-friendly syntax but sometimes lacks in performance. This means programmers and researchers need to re-write their code in other more performant languages like C and use Python as a script language only.

The Julia language is a new programming language that aims at solving the two-language problem. Having taken a lot of inspiration from MATLAB and Python, Julia has a user-friendly syntax but was built with efficiency in mind, reaching the speed of C. Julia defines itself as a scientific language: it provides out-of-the-box linear algebra routines and delivers a syntax that is very close to pure maths. Additionally, Julia has an integrated package manager that makes reproducible research easy. All of these features make Julia the perfect candidate for building a Speech Recognition toolkit using a single language.

Idiap research institute has recently taken a first step towards a Julia-based speech recognition toolkit. The first Julia language software package for speech recognition is now available:

HMMGradients.jl.  This package makes it possible to use gradient descent optimization to learn the parameters of Hidden Markov Models (HMMs). These optimization techniques allow the use of deep neural networks within HMMs as generally adopted by modern speech recognition systems.

Formally, HMMGradients.jl extends ChainRulesCore.jl making it possible to train HMM models using the automatic differentiation frameworks of Julia, for example using Zygote and machine learning libraries like Flux. Numerical stable algorithms to compute forward, backward and posterior probabilities of HMMs are also provided. The documentation explains the basic concepts of HMMs and introduces the procedures for training them. In fact, this software package is not only intended for speech recognition tasks but it can be easily adopted for other applications where HMM are useful such as alignment of bio-sequences and protein folding to cite only a few.