Coder Social home page Coder Social logo

colinator / timit_utils Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 3.0 1.26 MB

Python/numpy/pandas convenience wrapper for the TIMIT database.

License: MIT License

Python 5.44% Jupyter Notebook 94.56%
timit timit-database phonemes audio python phoneme-transcriptions timit-utils transcription audio-recordings

timit_utils's Introduction

TIMIT

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: https://catalog.ldc.upenn.edu/LDC93S1. This library merely adds convenience, parsing, sampling, drawing, etc.

alt text

timit_utils

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

Installation

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: https://github.com/colinator/timit_utils/blob/master/timit_utils_demonst.ipynb

timit_utils's People

Contributors

colinator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

timit_utils's Issues

FileNotFoundError

Hi,
Running the code

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])
                      ])

got the error:

FileNotFoundError: [WinError 3] The system cannot find the path specified: '../TIMIT\\TRAIN'

Could you please help me with this? what should I do?
I have installed timit_utils.

Thanks in advance
Atefeh

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.