Spaces:
Sleeping
Sleeping
Alexandre Gazola
commited on
Commit
·
a0ea7f5
1
Parent(s):
46431fc
tool para transcrever audio
Browse files- audio_to_text_tool.py +1 -1
audio_to_text_tool.py
CHANGED
@@ -7,7 +7,7 @@ from constants import OPENAI_KEY
|
|
7 |
# Initialize OpenAI client (uses OPENAI_API_KEY from environment or explicitly)
|
8 |
client = OpenAI(api_key=OPENAI_KEY)
|
9 |
|
10 |
-
|
11 |
def audio_to_text(base64_audio_path: str) -> str:
|
12 |
"""
|
13 |
Transcribes an audio file (base64-encoded text stored in a file) using OpenAI's Whisper API.
|
|
|
7 |
# Initialize OpenAI client (uses OPENAI_API_KEY from environment or explicitly)
|
8 |
client = OpenAI(api_key=OPENAI_KEY)
|
9 |
|
10 |
+
@tool
|
11 |
def audio_to_text(base64_audio_path: str) -> str:
|
12 |
"""
|
13 |
Transcribes an audio file (base64-encoded text stored in a file) using OpenAI's Whisper API.
|