Package containing one wrapper script over the Allosaurus phoneme recognition library, designed for passing the Allosaurus output data to MATLAB scripts for further analysis.
Project description
phonemeRecognizerWrapper
Package containing one wrapper script over the Allosaurus phoneme recognition library, designed for passing the Allosaurus output data to MATLAB scripts for further analysis.
Installation
- Install Python 3
- To see if Python is installed, use
py --version
in command line pip
is automatically included in the Python installation, but to check or update the pip version use:py -m ensurepip --upgrade
- To see if Python is installed, use
- Install this package
- From command line (assuming user has already installed python and pip):
pip install phonemeRecognizerWrapper
- This should also automatically install all dependent packages.
- From command line (assuming user has already installed python and pip):
Usage
This script uses the Allosaurus phoneme recognition package to extract phonemic content from audio files of human speech. This script acts as a wrapper over the allosaurus package for improved formatting and piping of data to MATLAB scripts for analysis (e.g. vowel formant extraction).
Command structure
py -m phonemeRecognizerWrapper.recognize LANGUAGE_CODE FILES EMIT_PROB
Required Arguments:
LANGUAGE_CODE
- Three characters long language code supported by the Allosaurus library. For the list of available languages, use command:
py -m allosaurus.bin.list_lang
- To display the phonetic inventory (list of phonemes) for a specific language, use:
py -m allosaurus.bin.list_phone [--lang <language name>]
- See here for more info.
- Example options:
"ipa"
- uses the whole available phonetic inventory for recognition (less accurate)"deu"
- german"gsw"
- swiss german"fra"
- french"eng"
- english
- Three characters long language code supported by the Allosaurus library. For the list of available languages, use command:
FILES
- Absolute path to a temp .txt file containing semicolon delimited text string of absolute paths to all files meant for recognition. Surround the string with apostrophes ("") if any of the paths contains spaces.
- Temp file contents example:
"C:\sounds\sound1.wav;C:\sounds\sound2.wav"
Optional Arguments:
EMIT_PROB
- Allosaurus setting that determines the phoneme emission rate of the underlying model. Higher number tells the model to produce more phonemes, smaller number vice versa.
Center is at1.0
, and optimal range that produces comprehensive outputs is0.8 - 1.5
. If omitted, default value of 1.5 is used.
- Allosaurus setting that determines the phoneme emission rate of the underlying model. Higher number tells the model to produce more phonemes, smaller number vice versa.
Examples
-
Example usage from command line:
py -m phonemeRecognizerWrapper.recognize eng "C:\sounds\sound.wav;C:\sounds\sound2.wav" 1.0
-
Example usage from MATLAB via the
[status, result] = system(command)
function:
command = 'py -m phonemeRecognizerWrapper.recognize eng "C:\sounds\sound.wav;C:\sounds\sound2.wav" 1.0';
- It is also recommended to use
set PYTHONIOENCODING=utf8
before the python command to ensure proper text formantting via the standard output pipe.
- It is also recommended to use
Contacts
For any questions, please email: petr.kryze@gmail.com
Authors: Petr Krýže @PetrKryze based on code from Vojtěch Illner
CTU Prague, FEE 2023
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file phonemeRecognizerWrapper-0.1.4.tar.gz
.
File metadata
- Download URL: phonemeRecognizerWrapper-0.1.4.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5302d421ce41b3d29984bc37b1d2e47df5129a0109404c4f0b44600adb5a9f4b |
|
MD5 | 44d2682a64769c49323d0181d53674c2 |
|
BLAKE2b-256 | 4a4d0545e8f597d6dcfc36ffc11f53067b7c2dda355c88dc85a0b16b7b0c5cc2 |
File details
Details for the file phonemeRecognizerWrapper-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: phonemeRecognizerWrapper-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e5fb16b24ba0bd44795cb6ef15cb8ba79ef98b00d562bf84acd6f22d189ad4 |
|
MD5 | 0f27ff6982162be937fe482c32c1ffd5 |
|
BLAKE2b-256 | 627254a0b9bfe64a2fc5b138ba084d0d9415cc4e25ce07aec0523f59b1d5d038 |