Skip to main content

pydrobert-speech

Documentation Status Build status License

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

For example, given feature configuration called fbanks.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 or HTK with the commands

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 DataLoader or Kaldi tables in your ASR pipeline, you can compute all a corpus' features by using the commands 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

Installation

pydrobert-speech is available via both PyPI and Conda.

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

Licensing and How to Cite

Please see the pydrobert page for more details on how to cite this package.

util.read_signal can read NIST SPHERE files. To do so, code was adapted from NIST sph2pipe program and put into pydrobert.speech._sphere. License information can be found in LICENSE_sph2pipe. Please note that the license only permits the use of their code to decode the "shorten" file type, not encode it.

Metadata

Release files for pydrobert-speech 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydrobert-speech 0.3.0
File Size Uploaded Provenance Actions
pydrobert-speech-0.3.0.tar.gz 649.3 kB Without provenance Details for pydrobert-speech-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydrobert-speech 0.3.0
File Interpreter ABI Platform Actions
pydrobert_speech-0.3.0-py3-none-any.whl Python 3 none any Details for pydrobert_speech-0.3.0-py3-none-any.whl

Total release size: 721.2 kB

Release files / pydrobert-speech-0.3.0.tar.gz

Download URL pydrobert-speech-0.3.0.tar.gz
Size 649.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c1fc5cfa7a61e1ee392d8a17594236a4d8fe2b9df4babef51558f1bf7ace748d
BLAKE2b-256 checksum
How to use checksums
1feeee1c9792d34c5d757c2c15c1ecaca24800baf791dbf1335eca8daa25aca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Release files / pydrobert_speech-0.3.0-py3-none-any.whl

Download URL pydrobert_speech-0.3.0-py3-none-any.whl
Size 71.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5f43b169d9a73699c8819108ebce028d718947eaaf1ea36cc11755c92bb95c6
BLAKE2b-256 checksum
How to use checksums
687e3a30633e0ca3575594a3557b7dbd5cfcf84f289f057c5b0cbb9fb457ae0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Security for pydrobert-speech 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page