real-time-translator


Namereal-time-translator JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/jpshag/real-time-translator
SummaryA real-time audio translator using Azure Cognitive Services and PyQt5
upload_time2024-06-02 08:02:58
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Real-Time Live Translator with PyQt GUI

This is a real-time live translator application built using Python, PyQt5, and Azure Cognitive Services. The application captures audio from the Windows system speakers using WASAPI loopback, translates the captured audio into a specified language, and displays the translated text in a GUI overlay that stays on top of all applications.

## Features
- **Real-Time Translation**: Captures and translates audio in real-time.
- **Subtitle Overlay**: Displays translated text as subtitles over all applications.
- **Configurable Input/Output Languages**: Users can specify input and output languages.
- **Audio Device Selection**: Users can choose from available audio devices.
- **Configuration Persistence**: Saves user preferences for input/output languages, selected audio device, and Azure settings.
- **Customization Options**: Customize the subtitle overlay's font, color, and appearance.
- **Settings Management**: Reset settings to default, import/export settings.

## Requirements
- pyenv
- pyenv-virtualenv
- A valid Azure Cognitive Services subscription key and service region.

## Installation

### Install pyenv and pyenv-virtualenv
Follow the instructions [here](https://github.com/pyenv/pyenv) to install pyenv.

Additionally, install pyenv-virtualenv by following the instructions [here](https://github.com/pyenv/pyenv-virtualenv).

### Clone this repository
```sh
git clone https://github.com/jpshag/real-time-translator.git
cd real-time-translator
```

### Set up a Python version with pyenv
Install a specific Python version (e.g., 3.8.10):
```sh
pyenv install 3.8.10
```

Set the local Python version for this project:
```sh
pyenv local 3.8.10
```

### Create and activate a virtual environment with pyenv-virtualenv
Create a virtual environment:
```sh
pyenv virtualenv 3.8.10 translator-env
```

Activate the virtual environment:
```sh
pyenv activate translator-env
```

### Install the required packages
If a `requirements.txt` is provided:
```sh
pip install -r requirements.txt
```

If `requirements.txt` is not provided, manually install the dependencies:
```sh
pip install pyaudio numpy scipy azure-cognitiveservices-speech PyQt5
```

## Configuration
Obtain an Azure Cognitive Services subscription key and service region. You can create a free account [here](https://azure.microsoft.com/free/cognitive-services/).

Create a `config.json` file with your settings:
```json
{
    "input_language": "en-US",
    "output_language": "es-ES",
    "audio_device_index": 0,
    "subtitle_font": "Arial,24",
    "subtitle_color": "#FFFFFF",
    "azure_subscription_key": "YourAzureSubscriptionKey",
    "azure_region": "YourServiceRegion"
}
```

## Usage
Run the application:
```sh
python main.py
```

Configure the input language, output language, and audio device using the GUI.

Click the "Start Translation" button to begin capturing and translating audio.

The translated text will be displayed in the GUI and as a subtitle overlay on top of all applications.

Click the "Stop Translation" button to stop the translation process.

To customize the subtitle overlay, click the "Settings" button and adjust the font, color, and other options as desired.

## Known Issues
- Ensure the correct audio device supporting WASAPI loopback is selected.
- The application currently supports only Windows due to the use of WASAPI for audio capture.

## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.

## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jpshag/real-time-translator",
    "name": "real-time-translator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "jpshag@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/4d/a6/63750cb4f37479e5de183da0b73756fe51b19ffc9454fb8c9cf94334e7b5/real_time_translator-0.1.2.tar.gz",
    "platform": null,
    "description": "\r\n# Real-Time Live Translator with PyQt GUI\r\n\r\nThis is a real-time live translator application built using Python, PyQt5, and Azure Cognitive Services. The application captures audio from the Windows system speakers using WASAPI loopback, translates the captured audio into a specified language, and displays the translated text in a GUI overlay that stays on top of all applications.\r\n\r\n## Features\r\n- **Real-Time Translation**: Captures and translates audio in real-time.\r\n- **Subtitle Overlay**: Displays translated text as subtitles over all applications.\r\n- **Configurable Input/Output Languages**: Users can specify input and output languages.\r\n- **Audio Device Selection**: Users can choose from available audio devices.\r\n- **Configuration Persistence**: Saves user preferences for input/output languages, selected audio device, and Azure settings.\r\n- **Customization Options**: Customize the subtitle overlay's font, color, and appearance.\r\n- **Settings Management**: Reset settings to default, import/export settings.\r\n\r\n## Requirements\r\n- pyenv\r\n- pyenv-virtualenv\r\n- A valid Azure Cognitive Services subscription key and service region.\r\n\r\n## Installation\r\n\r\n### Install pyenv and pyenv-virtualenv\r\nFollow the instructions [here](https://github.com/pyenv/pyenv) to install pyenv.\r\n\r\nAdditionally, install pyenv-virtualenv by following the instructions [here](https://github.com/pyenv/pyenv-virtualenv).\r\n\r\n### Clone this repository\r\n```sh\r\ngit clone https://github.com/jpshag/real-time-translator.git\r\ncd real-time-translator\r\n```\r\n\r\n### Set up a Python version with pyenv\r\nInstall a specific Python version (e.g., 3.8.10):\r\n```sh\r\npyenv install 3.8.10\r\n```\r\n\r\nSet the local Python version for this project:\r\n```sh\r\npyenv local 3.8.10\r\n```\r\n\r\n### Create and activate a virtual environment with pyenv-virtualenv\r\nCreate a virtual environment:\r\n```sh\r\npyenv virtualenv 3.8.10 translator-env\r\n```\r\n\r\nActivate the virtual environment:\r\n```sh\r\npyenv activate translator-env\r\n```\r\n\r\n### Install the required packages\r\nIf a `requirements.txt` is provided:\r\n```sh\r\npip install -r requirements.txt\r\n```\r\n\r\nIf `requirements.txt` is not provided, manually install the dependencies:\r\n```sh\r\npip install pyaudio numpy scipy azure-cognitiveservices-speech PyQt5\r\n```\r\n\r\n## Configuration\r\nObtain an Azure Cognitive Services subscription key and service region. You can create a free account [here](https://azure.microsoft.com/free/cognitive-services/).\r\n\r\nCreate a `config.json` file with your settings:\r\n```json\r\n{\r\n    \"input_language\": \"en-US\",\r\n    \"output_language\": \"es-ES\",\r\n    \"audio_device_index\": 0,\r\n    \"subtitle_font\": \"Arial,24\",\r\n    \"subtitle_color\": \"#FFFFFF\",\r\n    \"azure_subscription_key\": \"YourAzureSubscriptionKey\",\r\n    \"azure_region\": \"YourServiceRegion\"\r\n}\r\n```\r\n\r\n## Usage\r\nRun the application:\r\n```sh\r\npython main.py\r\n```\r\n\r\nConfigure the input language, output language, and audio device using the GUI.\r\n\r\nClick the \"Start Translation\" button to begin capturing and translating audio.\r\n\r\nThe translated text will be displayed in the GUI and as a subtitle overlay on top of all applications.\r\n\r\nClick the \"Stop Translation\" button to stop the translation process.\r\n\r\nTo customize the subtitle overlay, click the \"Settings\" button and adjust the font, color, and other options as desired.\r\n\r\n## Known Issues\r\n- Ensure the correct audio device supporting WASAPI loopback is selected.\r\n- The application currently supports only Windows due to the use of WASAPI for audio capture.\r\n\r\n## Contributing\r\nContributions are welcome! Please open an issue or submit a pull request for any changes or improvements.\r\n\r\n## License\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A real-time audio translator using Azure Cognitive Services and PyQt5",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/jpshag/real-time-translator"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbdb85715f79067de4d39252b347f73d5afda9a7640905d8fc83c5dc14fc77c2",
                "md5": "c9f661f7239d2554191a8255a1c2e2bd",
                "sha256": "d2aa6dbc11cbe15864eaf40afceff7259a1979fd0a05e82256697b5b307056b5"
            },
            "downloads": -1,
            "filename": "real_time_translator-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c9f661f7239d2554191a8255a1c2e2bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3082,
            "upload_time": "2024-06-02T08:02:56",
            "upload_time_iso_8601": "2024-06-02T08:02:56.774381Z",
            "url": "https://files.pythonhosted.org/packages/fb/db/85715f79067de4d39252b347f73d5afda9a7640905d8fc83c5dc14fc77c2/real_time_translator-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4da663750cb4f37479e5de183da0b73756fe51b19ffc9454fb8c9cf94334e7b5",
                "md5": "1867aa57756d11734fe1608779088e40",
                "sha256": "8855324291389340a3e1d7eef699e17647d61f45d486711ca462d3beab26c256"
            },
            "downloads": -1,
            "filename": "real_time_translator-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1867aa57756d11734fe1608779088e40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 2985,
            "upload_time": "2024-06-02T08:02:58",
            "upload_time_iso_8601": "2024-06-02T08:02:58.242261Z",
            "url": "https://files.pythonhosted.org/packages/4d/a6/63750cb4f37479e5de183da0b73756fe51b19ffc9454fb8c9cf94334e7b5/real_time_translator-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-02 08:02:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jpshag",
    "github_project": "real-time-translator",
    "github_not_found": true,
    "lcname": "real-time-translator"
}
        
Elapsed time: 0.28985s