This package translates speech to text
Project description
# speech to text
This python module converts speech to text.
- e.g. It will convert: “I watched movie triple H .” to “I watched movie named HHH”
“My weight is fifty five kilograms .” to “My weight is 55 kg”
<h1>Installation guide</h1>
Run this command in terminal: ` pip install speech_2_text ` The dependencies spaCy,word2number will also be installed after installing the package. It is better to have english language dependency requirement of spacy which is en_core_web_sm
To install this en_core_web_sm, run following command in terminal ` python -m spacy download en_core_web_sm ` <h1>Usage</h1>
First you have to import the module using the below code. ` import speech_2_text `
After importing the package use speech_2_text method to translate spoken to written form.
Example script: ` >>>from speech_2_text import speech2text ...sentence="This is triple A and this is double B try to repeat it " ...result=speech2text(sentence) ...print(result) ` Output: ` This is triple AAA and this is double BB try to repeat it `
<h1>Features Used to Develop this package</h1>
Name Entity Recognition technique is used to detect entities from given input. Name Entity Recognition is done using the library named ‘spaCy’. Entities such as QUANTITY (E.g weight: fifty kilograms), MONEY(e.g. amount: thousand dollars), PROPER NOUNS are detected using this technique.
The package word2number is used to convert numbers written as ‘two thousand’ to ‘2000’. Furthermore, few lines of logical code adds suffix/prefix as $/kg,etc. depending upon type of entity.
In some texts entity such as”double X” may occur. In this case, the word double acts as adjective followed by X as noun. To detect such texts along with their corresponding parts of speech spacy Token Matcher is used. Again, after detection of entity few lines of logical code will translate “double X” to “XX”.
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
Built Distribution
File details
Details for the file speech_text-1.0.0.tar.gz
.
File metadata
- Download URL: speech_text-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af6d8352a4ba5cbaf58cab401a335bd14ff211770c228bf8ab40d8d98522d93f |
|
MD5 | 185a5925d8b9eaef2f85037dc9043deb |
|
BLAKE2b-256 | f15e1bd3ff739924126684470bd5490bc3805bb9dc13506ef7cf6015798a4ec1 |
File details
Details for the file speech_text-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: speech_text-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e67716f29bef2cbc0aeb3794e5b38d9876a7e026fae605944dec4ce5fd14b4fa |
|
MD5 | 648d4ea52b2b9eef5deaf668a269d055 |
|
BLAKE2b-256 | 0a4bf2327ec11d943ac27a819639e88ccbcc681dda66976b9f5b861ce49b0080 |