mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-23 08:34:20 +01:00
➕ refactor: summarize error message without line number
This commit is contained in:
@@ -126,9 +126,21 @@ Example input: 'AAPL'
|
||||
'y',
|
||||
'https://www2.cs.uic.edu/~i101/SoundFiles/taunt.wav',
|
||||
f'''\
|
||||
import openai
|
||||
audio_file= open("/path/to/file/audio.mp3", "rb")
|
||||
transcript = openai.Audio.transcribe("whisper-1", audio_file)'''
|
||||
import requests
|
||||
url = "https://transcribe.whisperapi.com"
|
||||
headers = {{
|
||||
'Authorization': 'Bearer {os.environ['WHISPER_API_KEY']}'
|
||||
}}
|
||||
data = {{
|
||||
"url": "URL_OF_STORED_AUDIO_FILE"
|
||||
}}
|
||||
response = requests.post(url, headers=headers, data=data)
|
||||
assert response.status_code == 200
|
||||
print('This is the text from the audio file:', response.text)'''
|
||||
# f'''\
|
||||
# import openai
|
||||
# audio_file= open("/path/to/file/audio.mp3", "rb")
|
||||
# transcript = openai.Audio.transcribe("whisper-1", audio_file)'''
|
||||
]
|
||||
],
|
||||
indirect=True
|
||||
|
||||
Reference in New Issue
Block a user