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

Uploaded Source

Built Distributions

asrp-0.0.10-py3.7.egg (19.7 kB view details)

Uploaded Source

asrp-0.0.10-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asrp-0.0.10.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

Hashes for asrp-0.0.10.tar.gz
Algorithm Hash digest
SHA256 2a2e6a9621ae02df945287ace253726f7b231c69a64c353f92aa2be477c36755
MD5 008f1e475b14de3c50b43e613123ea92
BLAKE2b-256 9f5160d5653e7b6568551db1f8815a0152d4479f3c6611c16066ed5e113922a8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for asrp-0.0.10-py3.7.egg
Algorithm Hash digest
SHA256 b48363018d98044afe8743acb88b50691750cb2a69909ef598558de34c1e93ce
MD5 3f2ab326e7fae6862d683b01c2e6fbed
BLAKE2b-256 07fde6cec42278efa8bb7287dc4d1dd74d183985ea74cf3c736faa52d0eb235b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asrp-0.0.10-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

Hashes for asrp-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 1d496d8ca8c059ff24ccfbe92fefd8212637b16da84a3732e8eae7bb44fa33d2
MD5 70b1bd63b2bcc36116b80266a211a9f0
BLAKE2b-256 28b578cbd92e6e97896bd8b591a4bb4ffd6b50479f46ac37466875c609fed02b

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