Transcribe With Whisper AI
COMMENT
Created by @fredy_mederos
https://routinehub.co/shortcut/14413
COMMENT
Add your OpenAI API-KEY here
https://platform.openai.com/account/api-keys
TEXT
Text

Text
VARIABLES
Add
Text
to
API_KEY
COMMENT
Questions and prompts:
You can edit here the titles and prompts as you like.
DICTIONARY

Dictionary
VARIABLES
Set variable
PROMPTS
to
Dictionary
COMMENT
[Auto-Update]
DICTIONARY

Dictionary
NETWORK
Get contents of
https://routinehub.co/api/v1/shortcuts/
RoutineHubID
/versions/latest
Options Under Construction

Contents of URL
SCRIPTING
If
Result
contains
Version
VARIABLES
Set variable
LastVersion
to
Result
SCRIPTING
If
LastVersion
is greater than
CurrentVersion
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Update to the latest version →

Menu Result
SAFARI
Open
Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Skip Update

Menu Result
SCRIPTING
End Menu

Menu Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
End of [Auto-Update]
COMMENT
[File Size Validations]
DOCUMENTS
Get
File Size
from
Shortcut Input

File Size
SCRIPTING
If
File Size
is greater than
<value>
SCRIPTING
Show alert
Informational Message
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
If
File Size
is greater than
<value>
SCRIPTING
Show alert
Informational Message
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
End of [File Size Validations]
COMMENT
[Whisper AI]
NETWORK
Get contents of
https://api.openai.com/v1/audio/transcriptions
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
error
in
Contents of URL

Dictionary Value
SCRIPTING
If
Dictionary Value
has any value
SCRIPTING
Get
Value
for
message
in
Dictionary Value

Dictionary Value
SCRIPTING
Show
Dictionary Value
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
text
in
Contents of URL

Dictionary Value
VARIABLES
Set variable
TRANSCRIPTION
to
Dictionary Value
COMMENT
End of [Whisper AI]
SCRIPTING
Repeat
20 times

Repeat Results
COMMENT
[GPT Menu]
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Show Original Text

Menu Result
TEXT
ORIGINAL

Text
VARIABLES
Set variable
MENU
to
Text
SCRIPTING
PROMPTS (q1_title)

Menu Result
VARIABLES
Set variable
MENU
to
PROMPTS
SCRIPTING
PROMPTS (q2_title)

Menu Result
VARIABLES
Set variable
MENU
to
PROMPTS
SCRIPTING
PROMPTS (q3_title)

Menu Result
VARIABLES
Set variable
MENU
to
PROMPTS
SCRIPTING
End Menu

Menu Result
SCRIPTING
If
MENU
is
ORIGINAL
SCRIPTING
Show
TRANSCRIPTION
SCRIPTING
Otherwise
COMMENT
End of [GPT Menu]
COMMENT
[GPT-3.5-turbo]
TEXT
TRANSCRIPTION
MENU

Text
NETWORK
Get contents of
https://api.openai.com/v1/chat/completions
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
choices
in
Contents of URL

Dictionary Value
SCRIPTING
Get
Value
for
message
in
Dictionary Value

Dictionary Value
SCRIPTING
Get
Value
for
content
in
Dictionary Value

Dictionary Value
SCRIPTING
Show
Dictionary Value
COMMENT
End of [GPT-3.5-turbo]
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
Showcuts