swyxio / swyxdotio

This is the repo for swyx's blog - Blog content is created in github issues, then posted on swyx.io as blog pages! Comment/watch to follow along my blog within GitHub
https://swyx.io
MIT License
325 stars 43 forks source link

add Whisper to your iOS Action Button #501

Closed swyxio closed 3 months ago

swyxio commented 5 months ago

category: note

The new iPhones ditched the physical mute button with a software enabled action button, that allows some customization. the highest degree of customization is Shortcuts. Apple's default transcription is terrible. I got a new iPhone recently and so this is my chance.

It took me a while to work out how to make a shortcut that does this so here's a good starting point: https://www.icloud.com/shortcuts/65d0ab52410b463fbfc3d29ab5a15550 (note you will have to add your own openai api key for this to work).

whisper swyx for sharing, no key

and then call the api

whisper swyx for sharing, no key-1

the updated shortcut (same link as above for your ref: https://www.icloud.com/shortcuts/65d0ab52410b463fbfc3d29ab5a15550 )

also saves down the raw audio file incase, yknow, you like to hear your voice in future. it took a while to figure out how to title the file based on the transcribed content... shortcuts programming isn't very discoverable haha.

limit: 25mb file size - about 25 minutes of audio? (estimate - have not tested)

swyxio commented 3 months ago

note that the phone should be active "screen should be on" the whole time during recording - if it turns off during recording, audio will be lost.