{"id":18352737,"url":"https://github.com/membraneframework/membrane_element_gcloud_speech_to_text","last_synced_at":"2025-12-11T23:49:42.578Z","repository":{"id":40351376,"uuid":"198430181","full_name":"membraneframework/membrane_element_gcloud_speech_to_text","owner":"membraneframework","description":"Membrane plugin providing speech recognition via Google Cloud Speech-to-Text API","archived":false,"fork":false,"pushed_at":"2023-11-17T14:55:54.000Z","size":275,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T00:39:02.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/membraneframework.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-23T12:53:11.000Z","updated_at":"2021-11-29T12:58:46.000Z","dependencies_parsed_at":"2023-11-17T16:15:40.267Z","dependency_job_id":null,"html_url":"https://github.com/membraneframework/membrane_element_gcloud_speech_to_text","commit_stats":null,"previous_names":["membraneframework/membrane-element-gcloud-speech-to-text"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_element_gcloud_speech_to_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_element_gcloud_speech_to_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_element_gcloud_speech_to_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/membraneframework%2Fmembrane_element_gcloud_speech_to_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/membraneframework","download_url":"https://codeload.github.com/membraneframework/membrane_element_gcloud_speech_to_text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138003,"owners_count":21053775,"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-05T21:37:06.909Z","updated_at":"2025-12-11T23:49:42.539Z","avatar_url":"https://github.com/membraneframework.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Membrane Multimedia Framework: GCloud Speech To Text\n\n[![Hex.pm](https://img.shields.io/hexpm/v/membrane_element_gcloud_speech_to_text.svg)](https://hex.pm/packages/membrane_element_gcloud_speech_to_text)\n[![CircleCI](https://circleci.com/gh/membraneframework/membrane_element_gcloud_speech_to_text.svg?style=svg)](https://circleci.com/gh/membraneframework/membrane_element_gcloud_speech_to_text)\n\nThis package provides a Sink wrapping [Google Cloud Speech To Text Streaming API client](https://hex.pm/packages/gcloud_speech_grpc).\nCurrently supports only audio streams in FLAC format.\n\nThe docs can be found at [HexDocs](https://hexdocs.pm/membrane_element_gcloud_speech_to_text).\n\n## Installation\n\nThe package can be installed by adding `membrane_element_gcloud_speech_to_text` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:membrane_element_gcloud_speech_to_text, \"~\u003e 0.10.0\"}\n  ]\nend\n```\n\n## Configuration\n\nTo use the element you need a `config/config.exs` file with Google credentials:\n\n```elixir\nuse Mix.Config\n\nconfig :goth, json: \"a_path/to/google/credentials/creds.json\" |\u003e File.read!()\n```\n\nMore info on how to configure credentials can be found in [README of Goth library](https://github.com/peburrows/goth#installation)\nused for authentication.\n\n## Usage\n\nThe input stream for this element should be parsed, so most of the time it should be\nplaced in pipeline right after [FLACParser](https://github.com/membraneframework/membrane-element-flac-parser)\n\nHere's an example of pipeline streaming audio file to speech recognition API:\n\n```elixir\ndefmodule SpeechRecognition do\n  use Membrane.Pipeline\n\n  alias Google.Cloud.Speech.V1.StreamingRecognizeResponse\n\n  @impl true\n  def handle_init(_ctx, _options) do\n    spec =\n      child(%Membrane.File.Source{location: \"sample.flac\"})\n      |\u003e child(Membrane.FLAC.Parser)\n      |\u003e child(%Membrane.Element.GCloud.SpeechToText{\n          interim_results: false,\n          language_code: \"en-GB\",\n          word_time_offsets: true\n        })\n\n    {[spec: links], %{}}\n  end\n\n  @impl true\n  def handle_child_notification(%StreamingRecognizeResponse{} = response, _element, _ctx, state) do\n    IO.inspect(response)\n    {[], state}\n  end\n\n  @impl true\n  def handle_child_notification(_notification, _element, _ctx, state) do\n    {[], state}\n  end\nend\n```\n\nThe pipeline also requires [a config file](#configuration) and the following dependencies:\n\n```elixir\n[\n  {:membrane_core, \"~\u003e 1.0\"},\n  {:membrane_file_plugin, \"~\u003e 0.16.0\"},\n  {:membrane_flac_plugin, \"~\u003e 0.11.0\"},\n\t{:membrane_element_gcloud_speech_to_text, \"~\u003e 0.10.0\"}\n]\n```\n\n## Testing\n\nTests tagged `:external` are excluded by default since they contact the real API and require\nconfiguration of credentials. See [Configuration](#configuration)\n\n## Fixture\n\nA recording fragment in `test/fixtures` comes from an audiobook\n\"The adventures of Sherlock Holmes (version 2)\" available on [LibriVox](https://librivox.org/the-adventures-of-sherlock-holmes-by-sir-arthur-conan-doyle/)\n\n## Copyright and License\n\nCopyright 2019, [Software Mansion](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=membrane-element-gcloud-speech-to-text)\n\n[![Software Mansion](https://logo.swmansion.com/logo?color=white\u0026variant=desktop\u0026width=200\u0026tag=membrane-github)](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=membrane-element-gcloud-speech-to-text)\n\nLicensed under the [Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_element_gcloud_speech_to_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmembraneframework%2Fmembrane_element_gcloud_speech_to_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmembraneframework%2Fmembrane_element_gcloud_speech_to_text/lists"}