Skip to content

Instantly share code, notes, and snippets.

@jacobhak
Created April 25, 2013 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobhak/5463919 to your computer and use it in GitHub Desktop.
Save jacobhak/5463919 to your computer and use it in GitHub Desktop.
Applescript which takes an audio recording from Evernote and runs speech2text on it.
tell application "Evernote"
set notel to find notes "db"
set theNote to notel's first item
set att to get attachments of theNote
set theAtt to att's first item
set filepath to "Macintosh HD:Users:jacob:kod:speech2text-test:test.wav"
write theAtt to filepath
set s2t to do shell script "/bin/bash -lc 'speech2text /Users/jacob/kod/speech2text-test/test.wav'"
set s2t to characters 5 thru -2 of s2t as string
append theNote text s2t
set title of theNote to characters 1 thru 3 of s2t as string
move theNote to notebook named "log"
end tell
@jacobhak
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment