Clonning speechtext repository:
git clone https://github.com/nxSlayer/speechtext.py.git
cd speechtext.py
Installing the requirements:
pip install -r requirements.txt
In your project, import the speechtext.py class:
from speechtext import SpeechText
and init this class with api_key argument:
api = SpeechText('your_api_key')
start an task:
file = "your file path, url or bytes"
task = api.startTask(file=file)
print(task.status)
print(task.createdAt)
print(task.id)
# GETTING TASK RESULT
# Obs: time.sleep is recommended
result = api.taskResult(taskId=task.id)
print(result.status) # failed | finished
print(result.remainingSeconds) # int
print(result.transcript) # transcribed text
print(result.word_time_offsets) #list
Register in speechtext.ai and receive your free trial key in email
If you are looking for other solutions, you can look at the [speechtext.ai docs](https://speechtext.ai/speech-api-docs`enter code here`)