{"id":15306720,"url":"https://github.com/t0mer/tts-stt","last_synced_at":"2025-04-15T00:54:46.705Z","repository":{"id":53153569,"uuid":"351826130","full_name":"t0mer/tts-stt","owner":"t0mer","description":"Small pyhon flask container allowing us to convert Text to Speech and Speech to Text","archived":false,"fork":false,"pushed_at":"2025-03-03T11:03:27.000Z","size":1136,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T00:54:39.542Z","etag":null,"topics":["docker","flask","python","speech","speech-recognition","speech-to-text","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","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/t0mer.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":"2021-03-26T15:23:10.000Z","updated_at":"2025-04-03T14:31:08.000Z","dependencies_parsed_at":"2025-03-03T12:21:13.195Z","dependency_job_id":"37ed7476-f324-45b7-90cb-3fdf253c8128","html_url":"https://github.com/t0mer/tts-stt","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Ftts-stt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Ftts-stt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Ftts-stt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Ftts-stt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t0mer","download_url":"https://codeload.github.com/t0mer/tts-stt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986279,"owners_count":21194025,"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":["docker","flask","python","speech","speech-recognition","speech-to-text","tts"],"created_at":"2024-10-01T08:07:03.242Z","updated_at":"2025-04-15T00:54:46.689Z","avatar_url":"https://github.com/t0mer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TTS-STT\n## Text To Speech \u0026 Speech To Text\n\nTTS-STT is a Python \u0026 [Flask](https://flask.palletsprojects.com/en/1.1.x/) powerd, easy to use system that hepls you to convert Text to Speech or Speech to Text using small web app.\n\n## Features\n\n- Detecting the language of the text.\n- Selecting the TTS Voice.\n- Converting Speech to Text (Up to 1 minute long)\n\n## Components and Frameworks used in TTS-STT\n* [Flask](https://flask.palletsprojects.com/en/1.1.x/)\n* [Loguru](https://pypi.org/project/loguru/)\n* [Google cloud speech](https://pypi.org/project/google-cloud-speech/)\n* [Wavinfo ](https://pypi.org/project/wavinfo/)\n* [Soundfile](https://pypi.org/project/SoundFile/)\n* [Wave](https://pypi.org/project/Wave/)\n* [Pydub](https://pypi.org/project/pydub/)\n* [PyYAML](https://pypi.org/project/PyYAML/)\n* [Google trans new](https://pypi.org/project/google-trans-new/)\n* [Numpy](https://pypi.org/project/numpy/)\n* [Yuval Mejahez](https://github.com/rt400) for creating [pyttsreverso](https://github.com/rt400/pyttsreverso). Be sure you are running version 0.3\n\n \nThe TTS (Text to Speech) feature is free thanks to [Reverso Translations](https://www.reverso.net),\nBut the Speech To Text feature requires active google api cloud account with enabled billing account (pricing table can be found [here](https://cloud.google.com/speech-to-text/pricing)).\n\n## Installation\nAs i mentioned, in order to use Google Speech Recognition, we need to create Google Application and enable the API. Here are the steps you need to follow to integrate your program with the Google Speech-To-Text API.\n\n### Step 1) Create a Google Application\nThe first thing you need to access Google APIs is a Google account and create a Google application. You can create a google application using the google console: [Go to google console](https://console.cloud.google.com/).\n\nOnce you open the google console, click on the dropdown at the top. This dropdown is displaying your existing google application. After clicking, a pop up will appear, then click on “New Project.”\n\n[![Google Application](https://github.com/t0mer/tts-stt/blob/main/screenshots/google%20applications%20dashboard.png?raw=true \"Google Application\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/google%20applications%20dashboard.png?raw=true \"Google Application\")\n\n[![New Application](https://github.com/t0mer/tts-stt/blob/main/screenshots/new%20project.png?raw=true \"New Application\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/new%20project.png?raw=true \"New Application\")\n\nThen enter your application name and click on Create.\n\n### Step 2) Enable Cloud Speech-To-Text API\nOnce you have created your google application, you need to grant your application access to the “Google Cloud Speech-To-Text” API. To do so, go to the application dashboard and from there, go to the APIs overview. See below how to access:\n\n[![APIs overview](https://github.com/t0mer/tts-stt/blob/main/screenshots/apis%20overview.png?raw=true \"APIs overview\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/apis%20overview.png?raw=true \"APIs overview\")\n\nClick on “Enable Apis and Service,” and then search by “speech,” then all Google APIs to do with text will be listed.\n\n[![Enable Apis and Service](https://github.com/t0mer/tts-stt/blob/main/screenshots/enable%20api%20and%20services.png?raw=true \"Enable Apis and Service\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/enable%20api%20and%20services.png?raw=true \"Enable Apis and Service\")\n\n[![Enable STT](https://github.com/t0mer/tts-stt/blob/main/screenshots/enable%20stt%20service.png?raw=true \"Enable STT\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/enable%20stt%20service.png?raw=true \"Enable STT\")\n\nAnd then click “Enable.” Once enabled, you will grant permissions to your application to access the “Google Cloud Speech to Text API.”\n\n### Step 3) Download Google Credentials\nThe next step is Downloading your Google credentials. The credentials are necessary so Google can authenticate your application, and therefore Google knows that their API is being accessed by you. This way, they can measure how much you are using their APIs and charge you if the consumption passes the free threshold.\n\nHere are the steps to download the google credentials. First, from the home dashboard, got to “Go to APIs overview,” just like before, and on the left-hand side menu, click on credentials.\n\n[![Credentials](https://github.com/t0mer/tts-stt/blob/main/screenshots/credentials.png?raw=true \"Credentials\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/credentials.png?raw=true \"Credentials\")\n\nThen click on “Create Credentials” and create a “Service Account.”\n\n[![Service Account](https://github.com/t0mer/tts-stt/blob/main/screenshots/Service%20Account.png?raw=true \"Service Account\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/Service%20Account.png?raw=true \"Service Account\")\n\nEnter any service account name you like, and click Create.\nOptional, you can grant service account access to the project, and click Done.\n\n[![Grant Access](https://github.com/t0mer/tts-stt/blob/main/screenshots/Grant%20Access.png?raw=true \"Grant Access\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/Grant%20Access.png?raw=true \"Grant Access\")\n\nNow click on the service account you just created. The last click will take you to the service account details.\n\n[![service account details](https://github.com/t0mer/tts-stt/blob/main/screenshots/Service%20Accounts.png?raw=true \"service account details\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/Service%20Accounts.png?raw=true \"service account details\")\n\nGo to the “Keys” section and click on “Add Key” and “Create New Key,” which will create a new key. This key is associated with your application through the service account.\n\n[![Add Key](https://github.com/t0mer/tts-stt/blob/main/screenshots/add%20key.png?raw=true \"Add Key\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/add%20key.png?raw=true \"Add Key\")\n\nIn the pop-up, select JSON and click on Create, which will download a JSON file containing the key to your machine. Please make a note of where you save this file since you will need it next.\n\n[![Json File](https://github.com/t0mer/tts-stt/blob/main/screenshots/Key%20type.png?raw=true \"Json File\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/Key%20type.png?raw=true \"Json File\")\n\n### Step 4) Installing the container0\n#### docker-compose from hub\n```yaml\nversion: \"3.7\"\nservices:\n  tts-stt:\n    image: techblog/tts-stt:latest\n    ports:\n      - \"8080:8080\"\n    container_name: tts-stt\n    labels:\n      - \"com.ouroboros.enable=true\"\n    networks:\n      - default\n    volumes:\n      - ./ttstt/keys/key-file.json:/opt/ttstt/keys/key-file.json\n      - /etc/localtime:/etc/localtime:ro\n    restart: unless-stopped\n```\n\"key-file.json\" name is mandatory (you can't change it), this is the key file you have created and downloaded in step 3.\n\nNow, run ```docker-copmose up -d``` to pull and run your container.\nOpen your browser and nevigate to your container ip address wieh port 8080, you should see the following screen.\n[![TTS](https://github.com/t0mer/tts-stt/blob/main/screenshots/tts-stt.PNG?raw=true \"TTS\")](https://github.com/t0mer/tts-stt/blob/main/screenshots/tts-stt.PNG?raw=true \"TTS\")\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Ftts-stt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft0mer%2Ftts-stt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Ftts-stt/lists"}