This module can be used to retrieve a list of link to pronunciation to a a particular word from Forvo. This module require the Requests module to operate, install it from the python package index before.
There is only a function to call and it requires 3 arguments, other are default values.
```
import ForvoDownloader as forvo
links = forvo.ForvoRequest(QUERY, LANG, apikey, ACT='word-pronunciations', FORMAT='mp3' free=TRUE)
```
- QUERY
- LANG
- apikey
are mandatory.
Please feel free to play around and implement other ACTIONS described in the forvo API docs.
Language must be a code from this list. Example: 'English' -> 'en', 'French' ->'fr'
This is not an executable file so you need to know at least a little Python to get thing up and running. This script requires Requests to run. Get requests here.
- Get the test.py and forvo.py scripts.
- Get an APIKEY from Forvo. You can sign for the free plan which allows you to make 500 requests per day. Create a new file named apikey.txt and paste your APIKEY in it, save it and place it in the same folder as the test.py script.
- Get a list of the words you want the script to check for on Forvo. It must be a plain-text file with one word per line.
- The syntax to execute the test.py is:
Main('Language',limit)
You can find it on the bottom of the script. - Run the test.py script and choose your file from the dialog window.
- Search the downloaded files in /user/forvo, there will be a different folder for each language.
Obviously you can put more than a word per line and it will search for the entire phrase and whichever is the top rated will be downloaded, even if it's not the phrase you're looking for.
- Wrap everything into a separate module
- Write a wiki