Clonning speechtext repository:
git clone https://github.com/nxSlayer/speechtext.py.git
cd speechtext.pyInstalling the requirements:
pip install -r requirements.txtIn your project, import the speechtext.py class:
from speechtext import SpeechTextand 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) #listRegister 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`)