Spaces:
Configuration error
Configuration error
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -37,11 +37,10 @@ def run_crew(question, file_path):
|
|
| 37 |
# Custom tools
|
| 38 |
|
| 39 |
@tool("Audio Analysis Tool")
|
| 40 |
-
def audio_analysis_tool(
|
| 41 |
"""Transcribe audio file using OpenAI's Whisper model.
|
| 42 |
|
| 43 |
Args:
|
| 44 |
-
question (str): Question to answer
|
| 45 |
file_path (str): Path of the audio file to transcribe
|
| 46 |
|
| 47 |
Returns:
|
|
@@ -57,8 +56,7 @@ def run_crew(question, file_path):
|
|
| 57 |
client = OpenAI()
|
| 58 |
transcript = client.audio.transcriptions.create(
|
| 59 |
file=open(file_path, "rb"),
|
| 60 |
-
model=STT_MODEL
|
| 61 |
-
prompt=question,
|
| 62 |
)
|
| 63 |
return transcript.text
|
| 64 |
except Exception as e:
|
|
|
|
| 37 |
# Custom tools
|
| 38 |
|
| 39 |
@tool("Audio Analysis Tool")
|
| 40 |
+
def audio_analysis_tool(file_path: str) -> str:
|
| 41 |
"""Transcribe audio file using OpenAI's Whisper model.
|
| 42 |
|
| 43 |
Args:
|
|
|
|
| 44 |
file_path (str): Path of the audio file to transcribe
|
| 45 |
|
| 46 |
Returns:
|
|
|
|
| 56 |
client = OpenAI()
|
| 57 |
transcript = client.audio.transcriptions.create(
|
| 58 |
file=open(file_path, "rb"),
|
| 59 |
+
model=STT_MODEL
|
|
|
|
| 60 |
)
|
| 61 |
return transcript.text
|
| 62 |
except Exception as e:
|