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.7.tar.gz
(14.0 kB
view details)
Built Distributions
asrp-0.0.7-py3.7.egg
(19.3 kB
view details)
asrp-0.0.7-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file asrp-0.0.7.tar.gz
.
File metadata
- Download URL: asrp-0.0.7.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 | 662347fd607c2469fd72ca68c0a1012cdf0f0c363da805f81a2e3cba50f93ae2 |
|
MD5 | f64223e183ba35e8a5aecf7620760d2b |
|
BLAKE2b-256 | dd26df8bcc909d9ec604675259fbd4df83dd2574652707bce41fd9eeb5ff27e2 |
File details
Details for the file asrp-0.0.7-py3.7.egg
.
File metadata
- Download URL: asrp-0.0.7-py3.7.egg
- Upload date:
- Size: 19.3 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 | 56efc9503dcfcf8870e4506b8a549d7e17ed4902e0760284bab79fce8ce171d9 |
|
MD5 | 303249402cfd4b3ae516a1bea9bfed5e |
|
BLAKE2b-256 | 62b95303dc5a8a540a672aa9700da673a6d2e5a4889a9f1fc3f039437cdda8dc |
File details
Details for the file asrp-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: asrp-0.0.7-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 | 72e9d10d250712eb4aa5df64c8012a27e9a21148d16de85633c6d485a6a658bd |
|
MD5 | 105c68b314eb7e8005620ca9bbeb2d87 |
|
BLAKE2b-256 | a6cee54384c0582c181832813bef25bacbc9c0ee71723e15232417f304398add |