{"id":28398846,"url":"https://github.com/loglux/speakitai","last_synced_at":"2025-06-28T18:32:10.670Z","repository":{"id":295671639,"uuid":"990849138","full_name":"loglux/SpeakItAI","owner":"loglux","description":"Convert text to speech using Microsoft Azure Neural Text-to-Speech (TTS) and a simple Gradio web interface.","archived":false,"fork":false,"pushed_at":"2025-06-14T17:00:18.000Z","size":262,"stargazers_count":43,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T18:19:01.408Z","etag":null,"topics":["ai","ai-tools","azure","text-to-speech","tts","tts-engines"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loglux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-05-26T18:26:34.000Z","updated_at":"2025-06-14T06:59:34.000Z","dependencies_parsed_at":"2025-05-26T19:52:09.667Z","dependency_job_id":"4181ea14-1536-4f7b-855c-8501cd429ce9","html_url":"https://github.com/loglux/SpeakItAI","commit_stats":null,"previous_names":["loglux/speakitai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/loglux/SpeakItAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux%2FSpeakItAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux%2FSpeakItAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux%2FSpeakItAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux%2FSpeakItAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loglux","download_url":"https://codeload.github.com/loglux/SpeakItAI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux%2FSpeakItAI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262476247,"owners_count":23317238,"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":["ai","ai-tools","azure","text-to-speech","tts","tts-engines"],"created_at":"2025-06-01T06:11:57.788Z","updated_at":"2025-06-28T18:32:10.664Z","avatar_url":"https://github.com/loglux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpeakItAI – Neural Text-to-Speech with Azure \u0026 Gradio\n\nConvert text to speech using Microsoft Azure Neural Text-to-Speech (TTS) and a simple Gradio web interface.\n---\n\u003e ⚠️ **Note:**  \n\u003e This is the classic Gradio version of SpeakItAI.  \n\u003e For Docker support, FastAPI backend, and built-in user authentication, check out the [`fastapi-auth-docker`](https://github.com/loglux/SpeakItAI/tree/fastapi-auth-docker) branch!\n\u003e\n\u003e – Quick start, multi-user, browser-based registration, and NAS/server deployment:  \n\u003e [`fastapi-auth-docker`](https://github.com/loglux/SpeakItAI/tree/fastapi-auth-docker)\n---\n![SpeakItAI Interface](screenshots/interface.png)\n![Language List Update.png](screenshots/lang_list.png)\n![Aidio Library](screenshots/audio_library.png)\n\n*A simple, interactive interface for converting your text to realistic speech.*\n---\n\n## 🎯 Features\n\n- Neural TTS with dynamic voice selection across 140+ Azure-supported languages\n- Adjustable **speaking style**, **rate**, and **pitch**\n- Input via **textbox** or upload a `.txt` file\n- Output as **.wav** file, played directly in the browser\n- Dropdowns now **auto-populate** with default language, voice, and style\n- Human-readable **language names** in the UI (e.g., \"English (UK)\" instead of `en-GB`) — falls back to code if name not defined\n- 🔧 **Manage display names and visible languages directly in the UI** – no need to edit files or restart the app\n- Modular architecture – ready for expansion\n- 📂 **Audio Library** tab: browse, play, and delete generated audio files directly in the web interface\n- Configurable audio output folder via `.env` variable `AUDIO_OUTPUT_DIR`\n---\n\n## 🆓 Azure Free Tier\n\nMicrosoft Azure offers **500,000 characters per month free** for **Neural Text-to-Speech** on the **F0 (free) pricing tier**.\n\n- ⚡ Billing is per character\n- ✅ Free quota resets monthly\n- 🧪 No credit card required to start\n\n📖 More info: [Azure Speech Pricing](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/)\n\n---\n\n## 🌍 Language and Voice Support\n\nAzure Neural TTS supports **140+ languages and dialects**, with many realistic male and female voices, including:\n\n- 🇬🇧 British English\n- 🇺🇸 American English\n- 🇫🇷 French\n- 🇩🇪 German\n- 🇷🇺 Russian\n- 🇨🇳 Chinese\n- 🇪🇸 Spanish\n- 🇮🇳 Hindi\n- 🌐 And more\n\n📖 Full voice list and styles:  \n👉 [Azure Language \u0026 Voice Support](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support)\n\n---\n\n## 🚀 Setup Instructions\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/loglux/SpeakItAI.git\ncd SpeakItAI\n```\n### 🔐 Azure Setup (Required)\n\nBefore running this app, you need an active Azure Speech resource.\n\n1. Go to the [Azure Portal](https://portal.azure.com/)\n2. Create a **Speech** resource (Free F0 tier available)\n3. Copy the **Key** and **Region** from the resource's \"Keys and Endpoint\" section\n4. You will paste them into a `.env` file as shown below:\n\n### 2. Create `.env` File\n\n```bash\ncp .env.example .env\n```\n\nThen fill in your Azure credentials:\n\n```env\nAZURE_KEY=your_azure_key\nAZURE_REGION=your_azure_region\n```\n\n\u003e 💡 Example region: `ukwest`, `eastus`, `westeurope`, etc.\n\n---\n\n### 3. Install Dependencies\n\nUsing virtual environment (recommended):\n\n```bash\npython -m venv venv\nsource venv/bin/activate   # On Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n---\n\n### 4. (Optional) Update Voice List from Azure \nTo fetch the latest voices and update `config.json`, run:\n```bash\npython tts/azure/update_config.py\n\n```\n---\n### 5. Run the App\n\n```bash\npython app.py\n```\n\n---\n\n## 📝 Usage Notes\n\n- If both textbox and file are provided, the file takes priority.\n- Only `.txt` files are accepted for upload.\n- The output is saved and played as a `.wav` file.\n- If a voice does not support styles, \"default\" will be used automatically.\n- All generated audio files are stored in the folder specified by `AUDIO_OUTPUT_DIR` in your `.env` file (default: `audio_outputs`).\n- Use the **Audio Library** tab to play back or delete any generated audio file directly from the browser.\n\n---\n\n## 📂 Project Structure\n\n```\nSpeakItAI/\n├── app.py\n├── .env.example\n├── requirements.txt\n├── README.md\n├── audio_outputs/                # automatically created on runtime\n│\n├── screenshots/\n│   └── interface.png             # UI preview\n│\n└── tts/\n    ├── __init__.py\n    ├── base.py                   # optional: abstract provider interface\n    └── azure/\n        ├── __init__.py\n        ├── core.py               # AzureTTS implementation\n        ├── config.py             # language label loading and utilities\n        ├── config.json           # auto-generated voice config from Azure\n        ├── language_labels.json  # editable language name mappings (UI dropdowns)\n        └── update_config.py      # fetch and build config.json\n```\n---\n\n## 🧩 Configuration Notes\n\n### Voice Configuration (`config.json`)\n\n- Run `tts/azure/update_config.py` to fetch the latest Azure voice data.\n- This generates a new `tts/azure/config.json` with all supported languages, voices, genders, and available styles.\n- The app reads from `config.json` at runtime to populate the voice and style options.\n\n### Language Filter (`config.py`)\n\n### Language Labels (`language_labels.json`)\n\n- The list of **display names** for languages** is stored in a separate file:  \n  `tts/azure/language_labels.json`.\n- You can **add, rename, or delete** languages using the **“Edit Languages”** tab in the UI — no need to edit files manually or restart the app.\n- This list controls which languages appear in the dropdown, and how they are named (e.g., `\"English (UK)\"` instead of `\"en-GB\"`).\n\n#### Example structure:\n\n```json\n{\n  \"en-GB\": \"English (UK)\",\n  \"ru-RU\": \"Russian\",\n  \"ar-KW\": \"Arabic (Kuwait)\"\n}\n```\n\n#### Behaviour if the file is empty or missing:\n- The app will display **all available languages** found in `config.json`.\n- These will be shown using their **locale codes only** (e.g., `\"fr-FR\"`, `\"hi-IN\"`, `\"de-DE\"`), without readable labels.\n\n\u003e 💡 Use the “Edit Languages” tab to selectively re-add friendly names for only the languages you want to appear.\n\n---\n\n## 🨠 Architecture Note\n\nThe codebase is modular and ready for extension:\n- Add new languages or accents in `tts/config.py`\n- Replace the interface with FastAPI or Flask without touching `core.py`\n- Support alternative providers like ElevenLabs, Bark, or Google Cloud TTS later\n\n---\n\n## 🛡 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floglux%2Fspeakitai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floglux%2Fspeakitai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floglux%2Fspeakitai/lists"}