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.8.tar.gz
(14.0 kB
view details)
Built Distributions
asrp-0.0.8-py3.7.egg
(19.4 kB
view details)
asrp-0.0.8-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file asrp-0.0.8.tar.gz
.
File metadata
- Download URL: asrp-0.0.8.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 | 2de17027760f72b80ca59356ee6bec9d25e44ceabe45ffac75db54a5a958313a |
|
MD5 | a774876895b0a01569bd992f91cbf9b3 |
|
BLAKE2b-256 | 435835f772cf5dc9a95c20ec9736410ef553da63da6257899d7ad6545927d524 |
File details
Details for the file asrp-0.0.8-py3.7.egg
.
File metadata
- Download URL: asrp-0.0.8-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 | f5af751c30e178cb8f70888437e3d5c5d251f3e73ce6810573bddeb038fd35e5 |
|
MD5 | 12db582be5cc4b6f97acda4973d31f6f |
|
BLAKE2b-256 | 56b10c43f8986cd090cdca82d94dd77d1584a85dcdd541f712432adf17531e50 |
File details
Details for the file asrp-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: asrp-0.0.8-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 | 89e83953a854b216dff8c980ee35e76df135dc0e9612b03d16439c7e6ba8d7b6 |
|
MD5 | 8fc27ae72a783087352355bc4f1fa8c6 |
|
BLAKE2b-256 | db5520c00778729f935dbd6698ab6c6807012f505dba5d72f476b848f24b7af7 |