Skip to main content

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


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.5.tar.gz (13.9 kB view details)

Uploaded Source

Built Distributions

asrp-0.0.5-py3.7.egg (19.1 kB view details)

Uploaded Source

asrp-0.0.5-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file asrp-0.0.5.tar.gz.

File metadata

  • Download URL: asrp-0.0.5.tar.gz
  • Upload date:
  • Size: 13.9 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

Hashes for asrp-0.0.5.tar.gz
Algorithm Hash digest
SHA256 19065bdc9b2698a9d4b06ef880328bd558982177059a3e5c62474dd6f7e34464
MD5 a3c9699240acf96017347125c60b218e
BLAKE2b-256 c0e9fdd5d6bffa7f580fdd3a4615991348c6fdb941b05fb9e847733c1fe6be1f

See more details on using hashes here.

File details

Details for the file asrp-0.0.5-py3.7.egg.

File metadata

  • Download URL: asrp-0.0.5-py3.7.egg
  • Upload date:
  • Size: 19.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.48.2 CPython/3.7.8

File hashes

Hashes for asrp-0.0.5-py3.7.egg
Algorithm Hash digest
SHA256 05f6b29b67015898b42c60c4fcfd609cc2e846ad3cc109ff485ad37ae0966130
MD5 9fca40894569350158757e4c812b960a
BLAKE2b-256 23aee0295af60f720ab9d965bae2f1b2a34f2f13388479afb20568a273479697

See more details on using hashes here.

File details

Details for the file asrp-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: asrp-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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

Hashes for asrp-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c63a51bb469d37b1a3176d17e8afaa5fb6a929aea0cc206d25cb78d22ec5808d
MD5 edb2b54d813b7950c889cda8cd095d78
BLAKE2b-256 c3d096526f0ffb017cf934a9581d896d882048a40d34d5f95f39e8b1b040754e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page