fanolabsasr
FanoLabs Asr module for Python3
Installation
Current stable release (0.0.1)
$ pip install fanolabsasr
Common Usage
We suggest you load the module via import, pending the stabalizing of es modules in node:
from fanolabsasr import Asr
import os
curPath = os.path.abspath(os.path.dirname(__file__))
class Speech:
def __init__(self):
self.client = Asr(`url`, `corpId`, `authKey`)
def __call__(self, senderId, filepath, language):
return self.client.stt(senderId, filepath, language)
def main():
returnObj = Speech()(`senderId`, os.path.abspath(curPath + '/test.wav'), `Cantonese`)
print(returnObj)
if __name__ == '__main__':
main()
Note: url(e.g. https://xxx.fanoai.cn/asr)、`corpId`、`authKey` should set to the specific correct configuration.
API
stt(senderId,filepath,language)
-
senderIdA string representing the user for chatting with asr -
filepathA string representing the local wav file path -
languageA string representing the language for the user input content, allowed languages to 'Cantonese, English, Mandarin' -
Returns:
Note: successful response{ 'status': 200, 'content': [{ 'recording_id': 'speech', 'start_time': 0.83, 'end_time': 1.62, 'n_bests': [{ 'text': '明白街', 'confidence': 0.121796916 }], 'text': '明白街', 'confidence': 0.121796916, 'success': True }] }
Note: Error handling{ 'status': 500, 'statusText': 'Internal Server Error', 'error_msg': "'input_language'" }
License
MIT
Metadata
Release files for fanolabsasr 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fanolabsasr-0.0.1.tar.gz | 2.9 kB | Without provenance | Details for fanolabsasr-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fanolabsasr-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for fanolabsasr-0.0.1-py3-none-any.whl |
Total release size: 6.5 kB
Release files / fanolabsasr-0.0.1.tar.gz
| Download URL | fanolabsasr-0.0.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c1355265695c087efa7e31390e035b5a8399ceb7185075f1fa81ea292fca281
|
|
BLAKE2b-256 checksum How to use checksums |
35e35e51a9e4c9e7fe0bdc34bce76eb143efbfc4294332768a16e9f9efae2c67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
|
Release files / fanolabsasr-0.0.1-py3-none-any.whl
| Download URL | fanolabsasr-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a034e13888f3e08aa808d9770f27ad652618a151f219fc5542020f73b5b3063
|
|
BLAKE2b-256 checksum How to use checksums |
f3f8f5b08799102ee8384ff21fc75c74dac5b3a23166e95101b34a1e72c6e679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
|
Security for fanolabsasr 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.