GitXplorerGitXplorer
e

ForvoDownloader

public
19 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
d2d034ee5d9f22cd4faad76444172490a0ff23e2

Merge pull request #3 from EdoPut/patch-1

eedoput committed 10 years ago
Unverified
3039273a0d2ccf86149218f9c56b4df89129652f

fixed link to docs

eedoput committed 10 years ago
Unverified
3abdf2b869703a5f62cdaf63ac2f4c58f6457c83

fixed typo in ForvoRequest

eedoput committed 10 years ago
Unverified
75226bbe51757d1408d6370e020826a0f8b8bf8a

Update README.md

eedoput committed 11 years ago
Unverified
74531ab192437e6166d30a726fd3ce54009f380a

fixed issue #1

eedoput committed 11 years ago
Unverified
f65ca528dff85b5369accb80a6dbd6d7c8baf5d1

Farewell html, Markdown FTW!

eedoput committed 11 years ago

README

The README file for this repository.

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

  • [x] Wrap everything into a separate module
  • [ ] Write a wiki