Metadata-Version: 2.1
Name: pydrobert-speech
Version: 0.0.1
Summary: Speech processing with Python
Home-page: https://github.com/sdrobert/pydrobert-speech
Author: Sean Robertson
Author-email: sdrobert@cs.toronto.edu
License: Apache 2.0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: future
Provides-Extra: kaldi
Requires-Dist: pydrobert-kaldi; extra == 'kaldi'
Provides-Extra: pytorch
Requires-Dist: pydrobert-pytorch; extra == 'pytorch'
Provides-Extra: vis
Requires-Dist: matplotlib; extra == 'vis'

[![Build Status](https://travis-ci.com/sdrobert/pydrobert-speech.svg?branch=master)](https://travis-ci.com/sdrobert/pydrobert-speech)
[![Documentation Status](https://readthedocs.org/projects/pydrobert-speech/badge/?version=latest)](https://pydrobert-speech.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# pydrobert-speech

This pure-python library allows for flexible computation of speech features.

For example, given feature configuration called `fbanks.json`:

``` json
{
  "name": "stft",
  "bank": "fbank",
  "frame_length_ms": 25,
  "include_energy": true,
  "pad_to_nearest_power_of_two": true,
  "window_function": "hanning",
  "use_power": true
}
```

You can compute triangular, overlapping filters like
[Kaldi](http://kaldi-asr.org/) or [HTK](http://htk.eng.cam.ac.uk/) with the
commands

``` python
import json
from pydrobert.speech import *
# get the feature computer ready
params = json.load(open('fbank.json'))
computer = util.alias_factory_subclass_from_arg(compute.FrameComputer, params)
# assume "signal" is a numpy float array
feats = computer.compute_full(signal)
```

If you plan on using a [PyTorch](https://pytorch.org) `DataLoader` or Kaldi
tables in your ASR pipeline, you can compute all a corpus' features by
using the commmands `signals-to-torch-feat-dir` (requires *pytorch* package)
or `compute-feats-from-kaldi-tables` (requires *pydrobert-kaldi* package).

This package can compute much more than f-banks, with many different
permutations. Consult the documentation for a more in-depth discussion of how
to use it.

## Documentation

- [Latest](https://pydrobert-speech.readthedocs.io/en/latest/)
- [Stable](https://pydrobert-speech.readthedocs.io/en/stable/)

# Installation

_pydrobert-speech_ is available via both PyPI and Conda.

``` sh
conda install -c sdrobert pydrobert-speech
pip install pydrobert-speech
pip install git+https://github.com/sdrobert/pydrobert-speech # bleeding edge
```


