Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A convenience python wrapper for the TIMIT database.

Project description


The TIMIT database, in brief, contains audio recordings of sentences spoken by a set of people. It also includes word and phoneme transcriptions, along with their exact positions, as ranges, within the audio files.

As such, it is an interesting target for ML: we are given high-grade audio recordings as well as real-time phoneme and word transcriptions (or guesses at them, anyway).

The actual TIMIT database is NOT included, and is not free. Get it here: This library merely adds convenience, parsing, sampling, drawing, etc.

alt text


The code herein can lazily load, parse, and expose the TIMIT database of spoken audio, word and phoneme transcriptions. The layout of the TIMIT file system looks like this:

alt text

This library models the data with several classes:

  • Corpus (such as '../TIMIT', contains two SubCorpuses: train and test)
  • SubCorpus (such as 'train'|'test', contains several Regions)
  • Region (such as 'DR1', contains several Persons)
  • Person (such as 'Name:CJF0,Female')
  • Sentence (such as 'SA1', contains audio, word, and phoneme transcriptions as numpy arrays)

All the above give many ways to index, iterate, parse, search, and expose the data as pandas Dataframes.

  • various audio sampling, padding routines, mel filterbank frequency extractions, and a quick display system


pip install timit_utils

timit_utils requires numpy, pandas, matplotlib, scipy, python_speech_features, and SoundFile.

Example usage (i.e. in jupyter)

%matplotlib inline
import timit_utils as tu
import timit_utils.audio_utils as au
import timit_utils.drawing_utils as du

corpus = tu.Corpus('../TIMIT')
sentence = corpus.train.sentences_by_phone_df('aa').sentence[0]
du.DrawVerticalPanels([du.AudioPanel(sentence.raw_audio, show_x_axis=True),
                       du.WordsPanel(sentence.words_df, sentence.raw_audio.shape[0], show_x_axis=True),
                       du.PhonesPanel(sentence.phones_df, sentence.raw_audio.shape[0])

Full usage here:

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for timit-utils, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size timit_utils-0.9.0-py3-none-any.whl (11.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size timit_utils-0.9.0.tar.gz (10.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page