freshfish Posted July 19, 2014 Posted July 19, 2014 Hello, I'm David, an English teacher. I have a question. I often need to look up the phonetic transcriptions of a word (for example, alfred = /ˈælfrəd/). This can become a laborious task, even when using websites such as photransedit and phonetizer. I was wondering if there were people in this world clever enough to create an Alfred workflow to speed up this process. Ideally, the process would be something like: Invoke Alfred Type a keyword (such as IPA) Type dog *magic* Press enter to copy phonetic transcription (/dɒɡ/) to clipboard Navigate to document Press paste I have no coding ability whatsoever. Could you help with the *magic* part? Let me know if you can Thanks, David freshfish 1
RiONOntE Posted July 11, 2019 Posted July 11, 2019 (edited) Five years later, if you still need this, I just made one. Note that you need to get your own free API from Oxford Dictionary (max 1000 requests per month for prototype), and then replace the application ID and key with yours. Edited July 11, 2019 by johanalfred
kentmoney Posted October 23, 2019 Posted October 23, 2019 On 7/11/2019 at 3:59 AM, johanalfred said: Five years later, if you still need this, I just made one. Note that you need to get your own free API from Oxford Dictionary (max 1000 requests per month for prototype), and then replace the application ID and key with yours. Hello For some reason this is not working for me. I replaced the ID and key in the main.py file as stated, but it still doesnt work. Any ideas?
kentmoney Posted October 23, 2019 Posted October 23, 2019 To follow up, I ran a debug and got this error: Starting debug for 'IPA' [2019-10-22 22:04:35][ERROR: action.script] /bin/bash: line 2: /Users/johan/anaconda3/bin/python: No such file or directory
RiONOntE Posted October 23, 2019 Posted October 23, 2019 5 hours ago, kentmoney said: To follow up, I ran a debug and got this error: Starting debug for 'IPA' [2019-10-22 22:04:35][ERROR: action.script] /bin/bash: line 2: /Users/johan/anaconda3/bin/python: No such file or directory I'm working on a fix.
RiONOntE Posted October 23, 2019 Posted October 23, 2019 (edited) The update is now live: http://www.packal.org/workflow/copy-phonetic-spelling-ipa Should look like this: screenshot Remember to replace the ID and key. Please tell me if it works for you. Edited October 23, 2019 by johanalfred Mike Outram 1
deanishe Posted October 23, 2019 Posted October 23, 2019 A tip, if I may: It would be a good idea to store the APP_ID and APP_KEY in the Workflow Environment Variables table in the workflow's settings and retrieve them in your workflow with os.getenv(). That way, they won't get overwritten when installing a newer version of the workflow.
kentmoney Posted October 24, 2019 Posted October 24, 2019 ok, I have it working now! Thanks! Is there any way to be able to do multiple words at once? /θæŋks/!
RiONOntE Posted October 24, 2019 Posted October 24, 2019 20 hours ago, deanishe said: A tip, if I may: It would be a good idea to store the APP_ID and APP_KEY in the Workflow Environment Variables table in the workflow's settings and retrieve them in your workflow with os.getenv(). That way, they won't get overwritten when installing a newer version of the workflow. Great, I didn't know that. I'll try to find time to update the workflow. I'm newbie in making Alfred workflows, especially for other users. How is it typically done to ask user to input a key? 9 hours ago, kentmoney said: ok, I have it working now! Thanks! Is there any way to be able to do multiple words at once? /θæŋks/! It's not possible using Oxford Dictionary API and it supports searching one word in the dictionary only. I'd suggest using this website. Maybe I can make it work with multiple words using this. But that's for another day.
deanishe Posted October 24, 2019 Posted October 24, 2019 1 hour ago, johanalfred said: How is it typically done to ask user to input a key? You can just show a warning in Alfred saying "Go to Alfred Preferences and set an API key". If you want it to be a bit more user-friendly, you can ask the user to enter the API key in Alfred's query box and then save it to the preferences sheet using Alfred's AppleScript API.
kentmoney Posted October 24, 2019 Posted October 24, 2019 4 hours ago, johanalfred said: Great, I didn't know that. I'll try to find time to update the workflow. I'm newbie in making Alfred workflows, especially for other users. How is it typically done to ask user to input a key? It's not possible using Oxford Dictionary API and it supports searching one word in the dictionary only. I'd suggest using this website. Maybe I can make it work with multiple words using this. But that's for another day. Yes, that would be very cool!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now