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.11.tar.gz
(14.1 kB
view details)
Built Distributions
asrp-0.0.11-py3.7.egg
(19.6 kB
view details)
asrp-0.0.11-py3-none-any.whl
(12.6 kB
view details)
File details
Details for the file asrp-0.0.11.tar.gz
.
File metadata
- Download URL: asrp-0.0.11.tar.gz
- Upload date:
- Size: 14.1 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.62.3 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 785cab7c305ca8e2deb5b3b22fa83aacfa130f390c6967b2f4bd02c9c74b5c35 |
|
MD5 | 27db303cfd3a7f2ab80d240745e6d29e |
|
BLAKE2b-256 | c2e90840633ae229e3a496f28d6ce77f683da1df2679004cdd98486f005d56f2 |
File details
Details for the file asrp-0.0.11-py3.7.egg
.
File metadata
- Download URL: asrp-0.0.11-py3.7.egg
- Upload date:
- Size: 19.6 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.62.3 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5464378623732882e34224c25c99da4e17d06ecab645388de80b1a72fb6f6e93 |
|
MD5 | 1cf12d9bfb9ea4acb32e2342f26b4b07 |
|
BLAKE2b-256 | c54839c6e5c9fd47deed0661883d027777140732399b332023af5f33cb5bbafe |
File details
Details for the file asrp-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: asrp-0.0.11-py3-none-any.whl
- Upload date:
- Size: 12.6 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.62.3 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead74aca653909181e9a4c79f460ed1d292a40d420849eacdb1005c67de6941b |
|
MD5 | 558f29c4117134b6ba42cc57eb8dde56 |
|
BLAKE2b-256 | a9d24bb1eabb3dbf4245861d0c35782b10704cefe551cc208a88afee50d42d79 |