SlangLab-NU / VoiceCollector

Apache License 2.0
1 stars 1 forks source link

34 Old database being overwritten after each restart of the service #38

Closed jindaznb closed 10 months ago

jindaznb commented 10 months ago

This pr fix ticket #34 , #32. add validation for db initlization, if current database exist, will not create new database to overwrite old database. For detailed testing in production env see below server logs.

for ticket #32, create CSV and download wav

[ec2-user@ip-172-31-49-141 VoiceCollector]$  curl -X GET http://localhost:5000/api/v1/speak/get_csv
{"csv_path":"/data/voice/output","message":"CSV file generation complete apiv2"}
[ec2-user@ip-172-31-49-141 ~]$ cd VoiceCollector/data/voice/output/
[ec2-user@ip-172-31-49-141 output]$ ls
output.csv  test16.wav  test1.wav  test21.wav  test33.wav  test93.wav
[ec2-user@ip-172-31-49-141 output]$ cat output.csv 
audio_id,session_id,s3_url,date,ref_id,transcription,audio_path
1,21.268907222589316,test21.268907222589316.webm,2023-11-27 08:49:36,29,0 1 2 3 4 5 6 7 8 9 10,/data/voice/output/test21.wav

for ticket #34,