Jump to content

Challenge: phonetic transcript workflow


Recommended Posts

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

Link to comment
  • 4 years later...

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 by johanalfred
Link to comment
  • 3 months later...
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?

Link to comment
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.

Link to comment
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.

Link to comment
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! 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...