No project description provided
Project description
asrp
ASR text preprocessing utility
install
pip install asrp
usage - preprocess
input: dictionary, with key sentence
output: preprocessed result, inplace handling.
import asrp
batch_data = {
'sentence': "I'm fine, thanks."
}
asrp.fun_en(batch_data)
dynamic loading
import asrp
batch_data = {
'sentence': "I'm fine, thanks."
}
preprocessor = getattr(asrp, 'fun_en')
preprocessor(batch_data)
usage - evaluation
import asrp
targets = ['HuggingFace is great!', 'Love Transformers!', 'Let\'s wav2vec!']
preds = ['HuggingFace is awesome!', 'Transformers is powerful.', 'Let\'s finetune wav2vec!']
print("chunk size WER: {:2f}".format(100 * asrp.chunked_wer(targets, preds, chunk_size=None)))
print("chunk size CER: {:2f}".format(100 * asrp.chunked_cer(targets, preds, chunk_size=None)))
usage - hubertcode
import asrp
hc = asrp.HubertCode("facebook/hubert-large-ll60k", './km_feat_100_layer_20', 20)
hc('voice file path')
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
asrp-0.0.9.tar.gz
(14.0 kB
view details)
Built Distributions
asrp-0.0.9-py3.7.egg
(19.4 kB
view details)
asrp-0.0.9-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file asrp-0.0.9.tar.gz
.
File metadata
- Download URL: asrp-0.0.9.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d1a6ecca5efef0cc96030a8485b025cef98c67ab75a1ab21c39fa02459be10 |
|
MD5 | 7fce203c85edce3ec0fa6ed87c0632cf |
|
BLAKE2b-256 | 3e0b9d70f62ca56685aefb58a7b30c57584607d3cef3c1cb185282165f5f03cd |
File details
Details for the file asrp-0.0.9-py3.7.egg
.
File metadata
- Download URL: asrp-0.0.9-py3.7.egg
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfa13c9211975951161b0d7f7e7af03dcdf0c70cb9330d77c6ad7018fbced8d1 |
|
MD5 | 3eac245335140a081eb06dc5811c0d9b |
|
BLAKE2b-256 | 09f868254f8611171b643cfd8da83bd05a5570578c8a078a2fadde078a517a25 |
File details
Details for the file asrp-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: asrp-0.0.9-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cbddfe686c317d388f53b44b09b40ab8163139f8f74d604471b24021eb29c3a |
|
MD5 | babe2026082adfda63461387d451f575 |
|
BLAKE2b-256 | 151f37ca2b943b8af2f8da2147fbd27e6ef8c4f65e6a00928db3ce7ec09ecc4d |