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

Uploaded Source

Built Distributions

asrp-0.0.6-py3.7.egg (19.2 kB view details)

Uploaded Source

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: asrp-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 b1d913a88df1741635ab715a3ac4d529db671d0014d285843cfc2e743ef82938
MD5 a1a9b933bb1ba52655238697b88a59d6
BLAKE2b-256 ae5b391033fc78d5370c02b06037f7c230801ed9e2592f1f087fb473db00786a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asrp-0.0.6-py3.7.egg
  • Upload date:
  • Size: 19.2 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.6-py3.7.egg
Algorithm Hash digest
SHA256 bcb8532af35e91beb867d83e855661ccfb2aa851611e17e3678d43d792f6cf9f
MD5 fa65c44c922e8c7d0d017d6aa865f8fd
BLAKE2b-256 f41ee2ec63577cce2a3d50e74f5da61551113dcd184917f8bd65f4ea6e46646e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asrp-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c33f7be776a5ceb8f1dda1878412ad7998239e0e3e08741984a91304601c40
MD5 c6f948d0385141bea8852a0655ef5acf
BLAKE2b-256 abe860f5ffcfbfccdb1c8583ff23702f3c03759fa5c6bdbf55b5662dae86d93c

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