pyaudioai


Namepyaudioai JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/eberlemanuel/pyaudioai
SummaryGet an audio response from ChatGPT
upload_time2023-06-04 13:56:39
maintainer
docs_urlNone
authorManuel Eberle
requires_python>=3.8
license
keywords chatgpt openai audio tts pypi package
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyAudioAI Python Library

![Build and Test](https://github.com/eberlemanuel/pyaudioai/actions/workflows/test.yml/badge.svg)

The Python library combines the OpenAI ChatGPT API with audio input and output. 
With this, questions can be recorded as audio, 
sent to ChatGPT and the answer from ChatGPT can be output as audio again. 
For the audio output, gTTS (Google Text-to-Speech), a Python library and 
CLI tool to interface with Google Translate's text-to-speech API is used.

## Installation

You don't need this source code unless you want to modify the package. If you just
want to use the package, just run:

```sh
pip install pyaudioai
```

Install from source with:

```sh
python setup.py install
```

## Usage

Portaudio needs to be configured to have access to your computers microphone. 

Linux:
```bash
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
```

Mac OS X:
```bash
brew install portaudio
```

Windows:
```bash
pip install pipwin
pipwin install pyaudio
```

The OpenAI library needs to be configured with your account's secret key **OPENAI_API_KEY** which is available on the [website](https://platform.openai.com/account/api-keys).

Example:

```python
import os
import pyaudioai

audio_file = "question.wav" # question can be saved
question_audio = pyaudioai.RecordQuestion(5, audio_file)
question_audio.record()

response_class = pyaudioai.OpenAiResponse("<OPENAI_API_KEY>")
response_class.get_audio_response(audio_file)

question_audio.delete_file() # delete question audio if required
```

## Developer Documentation

The documentation of the source code for contributors can be found [here](https://eberlemanuel.github.io/pyaudioai/).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eberlemanuel/pyaudioai",
    "name": "pyaudioai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "chatgpt,openai,audio,tts,pypi,package",
    "author": "Manuel Eberle",
    "author_email": "info@manueleberle.de",
    "download_url": "https://files.pythonhosted.org/packages/de/28/3f7040ca335cb494ccda011108b4a932ea3b57832cd0762f5eb1e4fa44c6/pyaudioai-0.0.2.tar.gz",
    "platform": null,
    "description": "# PyAudioAI Python Library\n\n![Build and Test](https://github.com/eberlemanuel/pyaudioai/actions/workflows/test.yml/badge.svg)\n\nThe Python library combines the OpenAI ChatGPT API with audio input and output. \nWith this, questions can be recorded as audio, \nsent to ChatGPT and the answer from ChatGPT can be output as audio again. \nFor the audio output, gTTS (Google Text-to-Speech), a Python library and \nCLI tool to interface with Google Translate's text-to-speech API is used.\n\n## Installation\n\nYou don't need this source code unless you want to modify the package. If you just\nwant to use the package, just run:\n\n```sh\npip install pyaudioai\n```\n\nInstall from source with:\n\n```sh\npython setup.py install\n```\n\n## Usage\n\nPortaudio needs to be configured to have access to your computers microphone. \n\nLinux:\n```bash\nsudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0\n```\n\nMac OS X:\n```bash\nbrew install portaudio\n```\n\nWindows:\n```bash\npip install pipwin\npipwin install pyaudio\n```\n\nThe OpenAI library needs to be configured with your account's secret key **OPENAI_API_KEY** which is available on the [website](https://platform.openai.com/account/api-keys).\n\nExample:\n\n```python\nimport os\nimport pyaudioai\n\naudio_file = \"question.wav\" # question can be saved\nquestion_audio = pyaudioai.RecordQuestion(5, audio_file)\nquestion_audio.record()\n\nresponse_class = pyaudioai.OpenAiResponse(\"<OPENAI_API_KEY>\")\nresponse_class.get_audio_response(audio_file)\n\nquestion_audio.delete_file() # delete question audio if required\n```\n\n## Developer Documentation\n\nThe documentation of the source code for contributors can be found [here](https://eberlemanuel.github.io/pyaudioai/).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Get an audio response from ChatGPT",
    "version": "0.0.2",
    "project_urls": {
        "Bug Reports": "https://github.com/eberlemanuel/pyaudioai/issues",
        "Documentation": "https://github.com/eberlemanuel/pyaudioai",
        "Homepage": "https://github.com/eberlemanuel/pyaudioai",
        "Source Code": "https://github.com/eberlemanuel/pyaudioai",
        "Source Code Documenetation": "https://eberlemanuel.github.io/pyaudioai"
    },
    "split_keywords": [
        "chatgpt",
        "openai",
        "audio",
        "tts",
        "pypi",
        "package"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3276368a271b94b4d9c7ec76a52ec6b8f392f7fc2ff88e905717d62ad59c140",
                "md5": "6c895dd6759da6365b9ff69e910615ee",
                "sha256": "62aedb753aa16e0d93c8d6355e17c8c35af82a32e9b38bbc012d3872bbd8b959"
            },
            "downloads": -1,
            "filename": "pyaudioai-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c895dd6759da6365b9ff69e910615ee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5267,
            "upload_time": "2023-06-04T13:56:37",
            "upload_time_iso_8601": "2023-06-04T13:56:37.971674Z",
            "url": "https://files.pythonhosted.org/packages/f3/27/6368a271b94b4d9c7ec76a52ec6b8f392f7fc2ff88e905717d62ad59c140/pyaudioai-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de283f7040ca335cb494ccda011108b4a932ea3b57832cd0762f5eb1e4fa44c6",
                "md5": "df7fee3cd4b5e7005b6da7c697de89d6",
                "sha256": "dc5c0986c1b8c6f464b70e6e8c446478c8252d26e0a117b591b071df374f0334"
            },
            "downloads": -1,
            "filename": "pyaudioai-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "df7fee3cd4b5e7005b6da7c697de89d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5332,
            "upload_time": "2023-06-04T13:56:39",
            "upload_time_iso_8601": "2023-06-04T13:56:39.530940Z",
            "url": "https://files.pythonhosted.org/packages/de/28/3f7040ca335cb494ccda011108b4a932ea3b57832cd0762f5eb1e4fa44c6/pyaudioai-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-04 13:56:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eberlemanuel",
    "github_project": "pyaudioai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pyaudioai"
}
        
Elapsed time: 0.07892s