Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -182,7 +182,7 @@ class BasicAgent:
|
|
182 |
return response.choices[0].message.content.strip()
|
183 |
|
184 |
|
185 |
-
|
186 |
def _ask_gpt4o_with_mp3(self, audio: Image.Image, question: str) -> str:
|
187 |
buffered = BytesIO()
|
188 |
image.save(buffered, format="PNG")
|
@@ -200,9 +200,9 @@ class BasicAgent:
|
|
200 |
}]
|
201 |
)
|
202 |
return response.choices[0].message.content.strip()
|
203 |
-
|
204 |
-
def _transcribe_audio(self, audio_bytes:
|
205 |
-
audio_file = BytesIO(audio_bytes)
|
206 |
transcription = self.client.audio.transcriptions.create(model="whisper-1", file=audio_file)
|
207 |
print_coso(f"usato _transcribe_audio: {transcription}")
|
208 |
return transcription.text.strip()
|
|
|
182 |
return response.choices[0].message.content.strip()
|
183 |
|
184 |
|
185 |
+
'''
|
186 |
def _ask_gpt4o_with_mp3(self, audio: Image.Image, question: str) -> str:
|
187 |
buffered = BytesIO()
|
188 |
image.save(buffered, format="PNG")
|
|
|
200 |
}]
|
201 |
)
|
202 |
return response.choices[0].message.content.strip()
|
203 |
+
'''
|
204 |
+
def _transcribe_audio(self, audio_bytes: _io.BytesIO) -> str:
|
205 |
+
#audio_file = BytesIO(audio_bytes)
|
206 |
transcription = self.client.audio.transcriptions.create(model="whisper-1", file=audio_file)
|
207 |
print_coso(f"usato _transcribe_audio: {transcription}")
|
208 |
return transcription.text.strip()
|