Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saptakbhoumik/easyspeech
easySpeech is an open-source Python wrapper for google speech to text API that doesn't require PyAudio(So you especially windows user don't have to deal with the errors while installing PyAudio) and also works with hugging face transformers
https://github.com/saptakbhoumik/easyspeech
easyspeech speech-recognition
Last synced: 29 days ago
JSON representation
easySpeech is an open-source Python wrapper for google speech to text API that doesn't require PyAudio(So you especially windows user don't have to deal with the errors while installing PyAudio) and also works with hugging face transformers
- Host: GitHub
- URL: https://github.com/saptakbhoumik/easyspeech
- Owner: SaptakBhoumik
- License: mit
- Created: 2021-05-31T14:03:12.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-31T16:58:04.000Z (over 3 years ago)
- Last Synced: 2024-11-09T12:49:50.079Z (about 2 months ago)
- Topics: easyspeech, speech-recognition
- Language: Python
- Homepage: https://pypi.org/project/easySpeech/
- Size: 2.2 MB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Please check out my [latest project](https://github.com/Swallow-lang/swallow) => https://github.com/Swallow-lang/swallow
## easySpeech
---
[![GitHub issues](https://img.shields.io/github/issues/SaptakBhoumik/easySpeech)](https://github.com/SaptakBhoumik/easySpeech/issues)
[![GitHub forks](https://img.shields.io/github/forks/SaptakBhoumik/easySpeech)](https://github.com/SaptakBhoumik/easySpeech/network/members)
[![GitHub stars](https://img.shields.io/github/stars/SaptakBhoumik/easySpeech)](https://github.com/SaptakBhoumik/easySpeech/stargazers)
[![GitHub license](https://img.shields.io/github/license/SaptakBhoumik/easySpeech)](https://www.github.com/SaptakBhoumik/easySpeech/tree/master/LICENSE)
![GitHub last commit](https://img.shields.io/github/last-commit/SaptakBhoumik/easySpeech)
![GitHub contributors](https://img.shields.io/github/contributors/SaptakBhoumik/easySpeech)
[![Downloads](https://static.pepy.tech/badge/easySpeech)](https://pypi.org/project/easySpeech)
easySpeech is an open source python wrapper for google speech to text api that doesn't require PyAaudio(So you specially windows user don't have to deal with the errors while installing PyAudio) and also works with hugging face transformers
## Installation
You can install easySpeech very easily using the following command
```
pip3 install easySpeech
```## Usage
* Using google speech to text api
By default easySpeech comes with a default api key which you can for testing purposes using the following code.
```python
from easySpeech import speech
a=speech.speech('google')
print(a)
```
For production purpose use your own key because google can revoke the default api key at any time. Get your own api key from http://www.chromium.org/developers/how-tos/api-keys and use the following code
```python
from easySpeech import speech
a=speech.speech('google',key="your api key")
print(a)
```
Specifying the duration of speech recognition in seconds(default value is 5 seconds)
```python
from easySpeech import speech
a=speech.speech('google',duration = 10)
print(a)
```
Specifying the sample frequency(default is 44100)
```python
from easySpeech import speech
a=speech.speech('google',duration = 10,freq = 44100)
print(a)
```
Specifying the language(works only for google speech api and default is english)
```python
from easySpeech import speech
a=speech.speech('google',language="en-US")
print(a)
```
Converting an audio file to text(Currently it supports only wav file)
```python
from easySpeech import speech
a=speech.google_audio('recording.wav')
print(a)
```* Using hugging face transformers(works offline and no need of any kind of api key)
For using easySpeech with hugging face transformers use the following code.
```python
from easySpeech import speech
a=speech.speech('ml')
print(a)
```
Specifying the duration of speech recognition in seconds(default valus is 5 seconds)
```python
from easySpeech import speech
a=speech.speech('ml',duration = 10)
print(a)
```
Specifying the sample frequency(default is 44100)
```python
from easySpeech import speech
a=speech.speech('ml',duration = 10,freq = 44100)
print(a)
```
Converting an audio file to text(Currently it supports only wav file)
```python
from easySpeech import ml
a=ml.ml('recording.wav')
print(a)
```
* Recording audio
For recording audio use the following code
```python
from easySpeech import speech
speech.recorder('recording.wav')
```
For recording audio with a specific frequency use the following code(default is 44100)
```python
from easySpeech import speech
speech.recorder('recording.wav',freq = 50000)
```
For recording audio for a specific duration use the following code(default is 5s)
```python
from easySpeech import speech
speech.recorder('recording.wav',duration = 50)
```## How to contribute
Since it is a free software , you can contribute to make it better. New contributors are always welcome, whether you write code, create resources, report bugs, or suggest features.The easySpeech is written primarily in Python3x
Have a look at the [open issues](https://github.com/SaptakBhoumik/easySpeech/issues) to find a mission that resonates with you.
# Contact
Email: [email protected]
If you find any bug make a issue **immediately.**# License
easySpeech is lisenced under MIT license
```bash
MIT License | Copyright (c) 2021 SaptakBhoumikPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software
```