Príncipe de Asturias Hospital Voice Disorders Database Reader module
Project description
This Python module provides functions to retrieve data and information easily from Príncipe de Asturias Hospital Voice Disorders Database.
This module does not contain the database itself. The database belongs to Prof. Juan I. Godino-Llorente (email: ignacio.godino@upm.es) at Universidad Politécnica de Madrid, and he kindly makes it available for free to non-commercial research use. Users must contact him to obtain the license and to download the database.
Install
pip install hupa-voicedb
Use
from hupa import HUPA
# to initialize (must call this once in every Python session)
db = HUPA('<path to the root directory of the extracted database>')
# to get a copy of the full database as a Pandas dataframe
df = db.query() # default columns: "edad", "sexo", "Codigo"
# to get the patholgy code-name lookup table
# (note: not all pathologies are included in the database)
lut = db.pathologies
# to get age, gender, and R scores
df = db.query(["edad", "sexo", "R"])
# use Pandas' itertuples to read audio data iteratively
for id, *info in df.itertuples():
# read audio data
# (normalize to [0,1] unless given additional argument: normlize=False)
fs, x = db.read_data(id)
# run the acoustic data through your analysis function, get measurements
params = my_analysis_function(fs, x)
# log the measurements along with the age and GRBAS info
my_logger.log_outcome(id, *auxdata, *params)
# alternately, use database's `iter_data` method to process acoustic data
# iteratively over queried data (all female speakers along with age and G score)
for id, fs, x, auxdata in db.iter_data(auxdata_fields=["edad", "G"],
sexo="M"):
# run the acoustic data through your analysis function, get measurements
params = my_analysis_function(fs, x)
# log the measurements along with the age and GRBAS info
my_logger.log_outcome(id, *auxdata, *params)
# Finally, to get a dataframe of all the WAV files with their full paths
df = db.get_files(auxdata_fields=['Codigo'])
Project details
Release history Release notifications | RSS feed
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 hupa-voicedb-0.1.1.tar.gz
.
File metadata
- Download URL: hupa-voicedb-0.1.1.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48b5f6a77e00e0cf595d51499e0a2ac8651f2a362af41ef0753efcdc0a43b650 |
|
MD5 | b3efdfdffbc15ddff8e00a472b80b86b |
|
BLAKE2b-256 | eee4060df5c55f457403d12d3bd60f232d98735e0c391010c6a98a5f7f52d6ea |
File details
Details for the file hupa_voicedb-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: hupa_voicedb-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f388b206fd3a536c3b1f4797e53fdcb8b645b055e96d24f890f38784224fbb2c |
|
MD5 | 55a2810e5d89efff1cf265def1d09cb3 |
|
BLAKE2b-256 | 9d7db4861e685cc8bab15de28e5153db5141a693121eb4cb588e6187a3f30fad |