{"id":21413192,"url":"https://github.com/github0013/google_speech_v2","last_synced_at":"2026-01-02T19:40:41.945Z","repository":{"id":141756992,"uuid":"41522946","full_name":"github0013/google_speech_v2","owner":"github0013","description":null,"archived":false,"fork":false,"pushed_at":"2015-09-01T09:03:18.000Z","size":396,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T05:15:49.975Z","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/github0013.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-28T02:41:24.000Z","updated_at":"2016-08-30T22:57:01.000Z","dependencies_parsed_at":"2023-03-13T10:29:09.218Z","dependency_job_id":null,"html_url":"https://github.com/github0013/google_speech_v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgoogle_speech_v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgoogle_speech_v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgoogle_speech_v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgoogle_speech_v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0013","download_url":"https://codeload.github.com/github0013/google_speech_v2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910762,"owners_count":20367544,"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","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-11-22T18:17:27.743Z","updated_at":"2026-01-02T19:40:41.906Z","avatar_url":"https://github.com/github0013.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Speech API v2 gem\n\nThis gem lets you record your voice from microphone (for a fixed amount of seconds) and gets you back with the voice text.\n\n## References\n* https://github.com/gillesdemey/google-speech-v2\n* http://www.chromium.org/developers/how-tos/api-keys\n* https://aminesehili.wordpress.com/2015/02/08/on-the-use-of-googles-speech-recognition-api-version-2/\n\n\n## Prerequisites\n\n1. ruby2\n2. both `arecord` and `flac` commands  \n   originally meant to use on Raspberry Pi... you don't have `arecord` on OSX. \n3. create a project at https://console.developers.google.com\n4. enable Speech API  \n   1. read http://www.chromium.org/developers/how-tos/api-keys if you can't find Speech API\n   2. [subscribe](https://groups.google.com/a/chromium.org/forum/?fromgroups#!forum/chromium-dev) to chromium-dev and choose not to receive mail\n   3. go back to google developer's console and add Speech API\n5. create a key\n   1. go to credentials\n   2. create new\n   3. choose API key\n   4. choose browser key\n   5. and you get a key to use APIs\n\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'google_speech_v2', git: \"https://github.com/github0013/google_speech_v2.git\"\n```\n\nAnd then execute:\n\n    $ bundle\n\n\n## Usage\n\n### configs\n```ruby\nrequire \"google_speech_v2\"\n\n# make sure you set your API KEY before using\nGoogleSpeechV2::Config.api_key = \"__YOUR_KEY_HERE__\"\n\n# available list -\u003e GoogleSpeechV2.available_lang_list\nGoogleSpeechV2::Config.lang = \"en-us\" # default, the language you speak\n\n# you have to speak within the seconds. MAX 10-15secs.\nGoogleSpeechV2::Config.duration_in_sec = 5 # default, fixed recording time.  \n```\n\n### usage.1 setup a block then call it on demand\n```ruby\nGoogleSpeechV2.speech_to_text_block do |text, raw|\n  puts text\n  p raw\nend\n\n# this will call the block above when done\nGoogleSpeechV2.speech_to_text # blocks till recording ends\n```\n\n### usage.2 set a block on call\n```ruby\n# blocks till recording ends\nGoogleSpeechV2.speech_to_text do |text, raw|\n  puts text\n  p raw\nend\n```\n\n### usage.3 set lang or/and duration_in_sec on call\n```ruby\nGoogleSpeechV2.speech_to_text(lang: \"ja-JP\", duration_in_sec: 3) do |text, raw|\n  puts text\n  p raw\nend\n```\n\n\n## Testing\n\n```bash\n# you need to setup your API key if you want to run spec files\n# create .env file at this gem's root directory (where Gemfile is)\necho \"API_KEY=__YOUR_KEY_HERE__\" \u003e .env\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fgoogle_speech_v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0013%2Fgoogle_speech_v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fgoogle_speech_v2/lists"}