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.4.tar.gz
(13.7 kB
view details)
Built Distributions
asrp-0.0.4-py3.7.egg
(18.7 kB
view details)
asrp-0.0.4-py3-none-any.whl
(12.2 kB
view details)
File details
Details for the file asrp-0.0.4.tar.gz
.
File metadata
- Download URL: asrp-0.0.4.tar.gz
- Upload date:
- Size: 13.7 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 | d4a60a74e98554f50ab534cdc4acc629f49a4c65d91515eeaad184acd3b380aa |
|
MD5 | dfd5a04fa7e7ee560ef83043937adce0 |
|
BLAKE2b-256 | c9602c56ba6fa815c8753c5828158c36df047862902234114cdbb3d158608f97 |
File details
Details for the file asrp-0.0.4-py3.7.egg
.
File metadata
- Download URL: asrp-0.0.4-py3.7.egg
- Upload date:
- Size: 18.7 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 | 59ef6d76a2c4ddb0b5a319aa2e85a4ae97c0141c4b7daa944e62485c2e946dde |
|
MD5 | 8324cfee798a224ab677f84aedbfd645 |
|
BLAKE2b-256 | d7d3e22c8ba8695ab660d4647d2f27cf0ce7727d12cdef29a5be27a72c001b51 |
File details
Details for the file asrp-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: asrp-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.2 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 | 369545006b3037e3330f52fcb28e10548fc3ffb529c3e3c1b3c217910d39558b |
|
MD5 | 3b19a5ef0a30c46b3e9d8d85b98f323d |
|
BLAKE2b-256 | 1bc53a76d50decdc1c9ae9be6beb65627131733760f12ba8f623e39fa947bcc1 |