starting test program to get working play

This commit is contained in:
talksik
2023-04-29 09:37:49 -07:00
parent 292c238bc8
commit c51c7ec91f
4 changed files with 56 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# this program will record audio while the button is pressed
# and then will transcribe it by hitting our api
# NOTE: run export PYTHONPATH=$PYTHONPATH:$(pwd) to run this file from the root directory of the project
# so that all different modules can be used
import audio.audio as audio
import requests
API_URL = "http://192.168.50.159:5001/tts"
audioInstance = audio.Audio()
response = requests.post(API_URL, data={'text': 'hello world'})
print(response)
# get the file data from the response
# write the file data to a file
# save the file
# play the file
audioInstance.playFile('audio.wav')
+6
View File
@@ -0,0 +1,6 @@
certifi==2022.12.7
charset-normalizer==3.1.0
idna==3.4
PyAudio==0.2.13
requests==2.29.0
urllib3==1.26.15