Spaces:
Runtime error
Runtime error
change openai key
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def transcribe_audio(audio_path: str) -> str:
|
|
| 77 |
Returns:
|
| 78 |
str : Transcription of the audio.
|
| 79 |
"""
|
| 80 |
-
client = openai.Client(api_key=os.getenv("
|
| 81 |
with open(audio_path, "rb") as audio: # to modify path because it is arriving from gradio
|
| 82 |
transcript = client.audio.transcriptions.create(
|
| 83 |
file=audio,
|
|
|
|
| 77 |
Returns:
|
| 78 |
str : Transcription of the audio.
|
| 79 |
"""
|
| 80 |
+
client = openai.Client(api_key=os.getenv("OPENAI_API_KEY"))
|
| 81 |
with open(audio_path, "rb") as audio: # to modify path because it is arriving from gradio
|
| 82 |
transcript = client.audio.transcriptions.create(
|
| 83 |
file=audio,
|