-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new-contrib: Audio Whisper API with Local Device Microphones #1271
base: main
Are you sure you want to change the base?
Changes from all commits
9c75686
117523f
687d905
aced6cd
c2eaf92
7b53a86
3ab74f5
5318114
64a9070
7786f07
75e8e52
587df2b
e81cc13
e5d4800
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combining transcribing and translating here is a bit weird in this function, and also drops the def process_audio(file_name, is_english=True, prompt=""):
with open(file_name, "rb") as audio_file:
if is_english:
response = client.audio.transcriptions.create(
model="whisper-1", file=audio_file, prompt=prompt
)
else:
response = client.audio.translations.create(
model="whisper-1", file=audio_file
)
return response.text.strip() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't this this is how we intend for the prompt parameter to be used – looking at our docs, it is more of an example(s) than an instruction. |
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless the reader speaks Filipino they can't test this part out – how about translating from a more common second language like Spanish?
Also, an indefinite record makes many notebooks crash – set a 5-10 second limit as well.