{"id":16958474,"url":"https://github.com/dohliam/forvocl","last_synced_at":"2025-09-04T16:44:01.734Z","repository":{"id":30559101,"uuid":"34113914","full_name":"dohliam/forvocl","owner":"dohliam","description":"Play, list, and save Forvo pronunciations from the command-line","archived":false,"fork":false,"pushed_at":"2015-05-04T01:40:13.000Z","size":143,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T14:46:51.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dohliam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-17T11:53:52.000Z","updated_at":"2023-09-14T17:53:47.000Z","dependencies_parsed_at":"2022-08-17T19:10:28.636Z","dependency_job_id":null,"html_url":"https://github.com/dohliam/forvocl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dohliam/forvocl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fforvocl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fforvocl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fforvocl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fforvocl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dohliam","download_url":"https://codeload.github.com/dohliam/forvocl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fforvocl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273641105,"owners_count":25142242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T22:42:41.425Z","updated_at":"2025-09-04T16:44:01.649Z","avatar_url":"https://github.com/dohliam.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Forvocl is a command-line tool for accessing the API provided by [Forvo](http://forvo.com/). Using forvocl you can list, play back, get information on, and save audio pronunciations contributed by users of the site.\n\n* [1 Requirements](#requirements)\n* [2 Installation](#installation)\n  * [2.1 Installation from distro packages](#installation-from-distro-packages)\n    * [2.1.1 User packaged](#user-packaged)\n* [3 Usage](#usage)\n  * [3.1 Location of configuration file](#location-of-configuration-file)\n  * [3.2 Searching and playback](#searching-and-playback)\n  * [3.3 Options](#options)\n  * [3.4 Audio format](#audio-format)\n  * [3.5 Saving audio files to disk](#saving-audio-files-to-disk)\n* [4 Issues](#issues)\n* [5 Credits](#credits)\n* [6 License](#license)\n\n# Requirements\n* mplayer\n* a Forvo API key\n\n# Installation\nTo install you can either download the project source and run the script directly, or use a package manager to install the appropriate files for your distro.\n\n## Installation from distro packages\n### User packaged\n* ![logo](http://www.monitorix.org/imgs/archlinux.png \"arch logo\")Arch Linux: in the [AUR](https://aur.archlinux.org/packages/forvocl) and [Firef0x's Arch Linux Repository](http://firef0x.github.io/archrepo.html).\n\n# Usage\nUsing the `forvocl.rb` script you can look up and play back audio pronunciations from [Forvo](http://forvo.com/). This requires registering for a [Forvo API key](http://api.forvo.com/), which is free for non-commercial educational use.\n\nOnce you have a key, you just need to copy it into your forvocl config file in your user home directory (i.e. `~/.config/forvocl/config.yml`) under the section \"forvo key\". Uncomment the line `# :forvo_key: \"\"` and add your key between the quotation marks `\"\"`. Now you can look up pronunciations by running `forvocl.rb`.\n\n## Location of configuration file\n\nForvocl will attempt to read a configuration file located at `~/.config/forvocl/config.yml`. If it does not find it there (or if the directory doesn't exist), it will try looking in a few other places before giving up:\n\n1. If you use the [gdcl dictionary lookup tool](https://github.com/dohliam/gdcl) and have a `config.yml` file with a forvo key in `~/.config/gdcl`, there is no need to create a duplicate configuration file in the forvocl directory -- forvocl will read your key from the gdcl configuration.\n2. If you prefer (or if installed by your package manager) you can use the xdg config folder instead, located at `/etc/xdg/forvocl`\n3. As a last resort, forvocl will check for `config.yml` in the same folder as the `forvocl.rb` executable. This could be useful if you have downloaded the source and just want to try it out with minimal set up.\n\nIf the configuration file cannot be found in any of these locations, forvocl will exit with a message explaining the situation.\n\n## Searching and playback\nForvocl has both interactive and non-interactive lookup modes. If run without any command-line arguments, it will prompt for a [language code](http://www.forvo.com/languages-codes/) and a word to pronounce. You can find a full list of the supported codes [here](http://www.forvo.com/languages-codes/).\n\nYou can skip the prompts by supplying the language code and word to be pronounced as arguments when running `forvocl.rb`, in the form `ruby forvocl.rb [lang_code] [word_to_be_pronounced]`. For example, if you wanted to find the pronounciation of the word \"сегодня\" in Russian, you would enter:\n\n    ruby forvocl.rb ru сегодня\n\nThe last argument should probably be in quotes to avoid problems -- this also allows for pronunciation of phrases and other terms with spaces:\n\n    ruby forvocl.rb sv \"Johannes Robert Rydberg\"\n\nThe script will let you know how many pronunciations were found and print out a numbered list (example below):\n\n* command: `ruby forvocl.rb zh 发音`\n\n* output:\n```\n4 pronunciations found for \"发音\" in zh:\n\n  1. by Gliese (f from China)           0 [+1 -1]\n  2. by witenglish (m from China)       0 [+0 0]\n  3. by cloudrainner (m from China)     0 [+0 0]\n  4. by JuliaWu (f from China)          0 [+0 0]\n\n\nSelect a number to hear the corresponding pronunciation, or press \"a\" to hear all available pronunciations.\n```\n\nTo hear any of the listed pronunciations just enter the corresponding number and it will start playing automatically. If you press \"a\", all of the pronunciations will play in order. The numbers to the far right are the user rating that each pronunciation has received, in the format `rating [+upvotes -downvotes]`.\n\n## Options\nThe Forvo script has a number of options that can be supplied at the command-line:\n\n* `-m`, `--mp3` (_Use mp3 format instead of ogg_)\n* `-l`, `--list` (_List all pronunciations_)\n* `-u`, `--urls` (_Print a list of audio urls_)\n* `-a`, `--play-all` (_Play back all pronunciations without interaction_)\n* `-s`, `--save` (_Save all audio files to disk_)\n\nMany of these options can be combined, for example:\n\n`ruby forvocl.rb -lum en photogrammetry` (_Lookup the word \"photogrammetry\" and produce a list of pronunciations and urls in mp3 format_)\n\nIf you want to skip all interaction entirely and just play each audio result automatically, use the `-a` option and supply the language code and lookup terms on the command-line, e.g.:\n\n    ruby forvocl.rb -a fr prononciation\n\n## Audio format\nBy default, forvocl plays back and saves audio files in ogg format. If you want to switch to using mp3 format, just use the `-m` option.\n\n## Saving audio files to disk\nOnce you have finished listening to the audio, forvocl will prompt you to enter a number from the list of available pronunciations to save the file to disk. If you don't want to save any of the audio, just press any other key to quit. To save all of the available audio files, use the `-s` option.\n\n# Issues\nIf you get the following error when playing back audio: `mplayer: could not connect to socket`, it just means that you need to disable LIRC support in mplayer. You can do this quite easily by editing or creating the file `~/.mplayer/config` and adding the line:\n\n            nolirc=yes\n\n# Credits\nThis script was originally part of the [gdcl](https://github.com/dohliam/gdcl) command-line dictionary project.\n\nTable of contents generated by [tocdown](https://github.com/dohliam/tocdown).\n\n# License\nMIT license -- see LICENSE file for details.\n\nThe audio pronunciations on forvo are licensed [cc-by-nc-sa](http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohliam%2Fforvocl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdohliam%2Fforvocl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohliam%2Fforvocl/lists"}