{"id":19887067,"url":"https://github.com/m-nathani/speech_to_text","last_synced_at":"2025-05-02T17:30:24.311Z","repository":{"id":82313665,"uuid":"167436851","full_name":"m-nathani/speech_to_text","owner":"m-nathani","description":"how to use the Google Cloud Speech API to transcribe audio/video files.","archived":false,"fork":false,"pushed_at":"2019-02-18T20:02:35.000Z","size":1813,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-07T03:41:24.849Z","etag":null,"topics":["audio","composer","ffmpeg","google-cloud","google-cloud-speech","google-speech-recognition","googlespeechapi","php","speech","speech-api","speech-quickstart","speech-recognition","speech-samples","speech-to-text","speechphrase","transcribe-audio-files","transcriber"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-nathani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-24T20:59:31.000Z","updated_at":"2024-02-20T08:38:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"147a6333-cea9-4b36-964d-463a7c14bebf","html_url":"https://github.com/m-nathani/speech_to_text","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/m-nathani%2Fspeech_to_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-nathani%2Fspeech_to_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-nathani%2Fspeech_to_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-nathani%2Fspeech_to_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-nathani","download_url":"https://codeload.github.com/m-nathani/speech_to_text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252080734,"owners_count":21691563,"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":["audio","composer","ffmpeg","google-cloud","google-cloud-speech","google-speech-recognition","googlespeechapi","php","speech","speech-api","speech-quickstart","speech-recognition","speech-samples","speech-to-text","speechphrase","transcribe-audio-files","transcriber"],"created_at":"2024-11-12T17:40:32.108Z","updated_at":"2025-05-02T17:30:24.305Z","avatar_url":"https://github.com/m-nathani.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Cloud Speech\nThese samples show how to use the [Google Cloud Speech API][speech-api]\nto transcribe audio files.\n\n1. It takes mp4 files as argument\n2. Converts it to audio in FLAC encoding (lossless encoding ) and Breaks the audio file into 10 secs clips\n3. transcribes each 10 sec audio file and prints the speech to text result on console. \n\n\n## Pre-requisite\n\n0. Setup Google Cloud [Speech Project][speech-quickstart]\n1. Install ffmpeg on your machine (linux)\n\n\n## Installation\n\nInstall the dependencies for this library via [composer](https://getcomposer.org)\n\n    $ cd /path/to/speech_to_text\n    $ composer install\n\nConfigure your project using [Application Default Credentials]\n\n    $ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json\n\n\n## Usage\n\nTo run the Speech Samples:\n\n    $ php speech.php\n\n    Cloud Speech\n\n    Usage:\n      command [options] [arguments]\n\n    Options:\n      -h, --help            Display this help message\n      -q, --quiet           Do not output any message\n      -V, --version         Display this application version\n          --ansi            Force ANSI output\n          --no-ansi         Disable ANSI output\n      -n, --no-interaction  Do not ask any interactive question\n      -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\n    Available commands:\n      help                    Displays help for a command\n      list                    Lists commands\n      transcribe              Transcribe an video file using Google Cloud Speech API\n\n\n## Help\n\n      $ php speech.php transcribe --help\n\n    Usage:\n        transcribe [options] [--] \u003cvideo-file\u003e\n\n    Arguments:\n        video-file                   The video file to transcribe\n\n    Options:\n        -l, --language=LANGUAGE      The language to transcribe [default: \"en-US\"]\n        -e, --encoding=ENCODING      The encoding of the audio file. This is required if the encoding is unable to be determined. [default: 2]\n        -b, --brand-file=BRAND-FILE  The brand names for speech context to transcribe [default: \"brands\"]\n        -r, --rate-hertz=RATE-HERTZ  The sample rate (in Hertz) of the supplied video [default: 48000]\n        -h, --help                   Display this help message\n        -q, --quiet                  Do not output any message\n        -V, --version                Display this application version\n            --ansi                   Force ANSI output\n            --no-ansi                Disable ANSI output\n        -n, --no-interaction         Do not ask any interactive question\n        -v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\n    Help:\n        Transcribe an video file using Google Cloud Speech API\n        The transcribe command transcribes video from a file using the\n        Google Cloud Speech API.\n        \n        php speech.php transcribe video_file.mp4\n\n\nJust send the speech sample, send it through the speech\nAPI using the transcribe command:\n\n```sh\nphp speech.php transcribe [path to audio/video file]\n\n```\n\n[speech-api]: http://cloud.google.com/speech\n[speech-quickstart]: https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries\n[google-cloud-php]: https://googlecloudplatform.github.io/google-cloud-php/\n[choose-encoding]: https://cloud.google.com/speech/docs/best-practices#choosing_an_audio_encoding\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-nathani%2Fspeech_to_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-nathani%2Fspeech_to_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-nathani%2Fspeech_to_text/lists"}