Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def record_text(audio_file,api_key):
|
|
21 |
transcript = client.audio.transcriptions.create(
|
22 |
model="whisper-1",
|
23 |
file=audio_file,
|
24 |
-
response_format="
|
25 |
)
|
26 |
return transcript
|
27 |
# return(str(path.getsize(audio_file)/1000000)+'mb')
|
@@ -52,7 +52,7 @@ def api_calling(audio_file, prompt, api_key):
|
|
52 |
if len(prompt) == 0:
|
53 |
prompt = '''Hi, I have created an app where I am uploading a video and then converting it to .mp3 format so that I could use
|
54 |
AI to convert, speech to text. Then that text is also provided to the AI so that the user can ask any question regarding the video
|
55 |
-
in the chatbot created by me. Your job is
|
56 |
video, answer it if possible. Apply proper punctuations, upper case and lower case to the provided text and be gentle.'''
|
57 |
|
58 |
return audio_text
|
|
|
21 |
transcript = client.audio.transcriptions.create(
|
22 |
model="whisper-1",
|
23 |
file=audio_file,
|
24 |
+
response_format="srt"
|
25 |
)
|
26 |
return transcript
|
27 |
# return(str(path.getsize(audio_file)/1000000)+'mb')
|
|
|
52 |
if len(prompt) == 0:
|
53 |
prompt = '''Hi, I have created an app where I am uploading a video and then converting it to .mp3 format so that I could use
|
54 |
AI to convert, speech to text. Then that text is also provided to the AI so that the user can ask any question regarding the video
|
55 |
+
in the chatbot created by me. Your job is provide the summary of the transcript. User might ask a question from a particular time stamp of the
|
56 |
video, answer it if possible. Apply proper punctuations, upper case and lower case to the provided text and be gentle.'''
|
57 |
|
58 |
return audio_text
|