Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,8 +106,9 @@ def reset_member():
|
|
| 106 |
def transcription():
|
| 107 |
global transcription_text
|
| 108 |
global total_audio
|
|
|
|
| 109 |
print(transcription_text)
|
| 110 |
-
if transcription_text
|
| 111 |
try:
|
| 112 |
audio_directory = transcripter.merge_segments(total_audio,'/tmp/data/transcription_audio')
|
| 113 |
transcription_text = transcripter.create_transcription(audio_directory)
|
|
@@ -122,7 +123,7 @@ def transcription():
|
|
| 122 |
@app.route('/analyze',methods =['GET','POST'])
|
| 123 |
def analyze():
|
| 124 |
global transcription_text
|
| 125 |
-
if transcription_text
|
| 126 |
try:
|
| 127 |
audio_directory = transcripter.merge_segments(total_audio,'/tmp/data/transcription_audio')
|
| 128 |
transcription_text = transcripter.create_transcription(audio_directory)
|
|
|
|
| 106 |
def transcription():
|
| 107 |
global transcription_text
|
| 108 |
global total_audio
|
| 109 |
+
print("/transcription")
|
| 110 |
print(transcription_text)
|
| 111 |
+
if not os.path.exists(transcription_text):
|
| 112 |
try:
|
| 113 |
audio_directory = transcripter.merge_segments(total_audio,'/tmp/data/transcription_audio')
|
| 114 |
transcription_text = transcripter.create_transcription(audio_directory)
|
|
|
|
| 123 |
@app.route('/analyze',methods =['GET','POST'])
|
| 124 |
def analyze():
|
| 125 |
global transcription_text
|
| 126 |
+
if not os.path.exists(transcription_text):
|
| 127 |
try:
|
| 128 |
audio_directory = transcripter.merge_segments(total_audio,'/tmp/data/transcription_audio')
|
| 129 |
transcription_text = transcripter.create_transcription(audio_directory)
|