Skip to content

Use forvo API to retrieve link to pronunciations in many languages.

License

Notifications You must be signed in to change notification settings

dmftdev/ForvoDownloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ForvoDownloader

Pronunciations by Forvo

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'

Example

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.

  1. Get the test.py and forvo.py scripts.
  2. 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.
  3. 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.
  4. The syntax to execute the test.py is: Main('Language',limit) You can find it on the bottom of the script.
  5. Run the test.py script and choose your file from the dialog window.
  6. 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.

To do

  • Wrap everything into a separate module
  • Write a wiki

About

Use forvo API to retrieve link to pronunciations in many languages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%