Closed aanchan closed 1 year ago
I have reviewed the code, and changed 2 lines in server/app/scripts/db_helper.py so the False is no longer hard-coded. I was also able to run the code with a MinIO server without errors:
Successfully saved the audio file locally to MinIO:
Submitted successfully through the web application:
Log from server:
Level: INFO
Time: 2023-08-11 09:04:39,085
Logger: speak
Path: length_check:9
Function :get_audio_length
Message: duration (s): 2.7
00000000000000000000000000000000000001111111111+(1.1100000000000008)111111111111111111111111111111111111111111-(2.6699999999999973)
Level: INFO
Time: 2023-08-11 09:04:39,088
Logger: speak
Path: silence_check:165
Function :get_silence_ratio
Message: Voiced frames count: 52
Level: INFO
Time: 2023-08-11 09:04:39,089
Logger: speak
Path: silence_check:166
Function :get_silence_ratio
Message: Total frames count: 89
Level: INFO
Time: 2023-08-11 09:04:39,089
Logger: speak
Path: silence_check:168
Function :get_silence_ratio
Message: Silence ratio: 0.42
Level: INFO
Time: 2023-08-11 09:04:39,104
Logger: werkzeug
Path: _internal:224
Function :_log
Message: 127.0.0.1 - - [11/Aug/2023 09:04:39] "POST /api/v1/speak/submit/test6.194589849758225.webm HTTP/1.1" 200 -
Level: INFO
Time: 2023-08-11 09:06:46,680
Logger: werkzeug
Path: _internal:224
Function :_log
Message: * Detected change in 'C:\\Users\\macar\\Documents\\SlangLab-NU\\VoiceCollector\\server\\app\\scripts\\db_helper.py', reloading
Level: INFO
Time: 2023-08-11 09:06:46,714
Logger: werkzeug
Path: _internal:224
Function :_log
Message: * Restarting with stat
Level: WARNING
Time: 2023-08-11 09:06:47,161
Logger: werkzeug
Path: _internal:224
Function :_log
Message: * Debugger is active!
Level: INFO
Time: 2023-08-11 09:06:47,163
Logger: werkzeug
Path: _internal:224
Function :_log
Message: * Debugger PIN: 800-430-275
This is a working version with Minio.
I followed the steps here to set up Minio locally on the Mac: https://simonjcarr.medium.com/running-s3-object-storage-locally-with-minio-f50540ffc239
For the python code integration I followed the Minio documentation from here : https://min.io/docs/minio/linux/developers/python/minio-py.html
I created a bucket named local-s3 as it appears here on the Minio console:
The file
test27.wav
was written locally after a recording was completed.This was my local
.env
file:Here is the log as the file was received in the backend: