vocochat


Namevocochat JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://python.dobyemail.com
SummaryNone
upload_time2024-10-15 16:17:01
maintainerNone
docs_urlNone
authorTom Sapletta
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Audio Library

This is a Python library for audio interface, including text-to-speech (TTS), speech-to-text (STT), audio playback, recording, and processing. It can be used in desktop apps, web apps, and provides a simple API for integration.

## Features

- Text-to-speech conversion
- Speech-to-text conversion 
- Audio playback
- Audio recording
- Audio processing

## Installation

1. Clone the repository:

```bash
git clone https://github.com/yourusername/audio-library.git
cd audio-library
```

2. Build and run the Docker container:

```bash
docker-compose up --build
```

This will build the Docker image, install all dependencies (including PortAudio), and run the unit tests.

## Usage

Here's an example of how to use the various features of the library:

```python
from vocochat.audio.audio import AudioInterface

audio = AudioInterface()

# Text-to-speech example
text = "Hello, this is a test of the text-to-speech functionality."
audio_data = audio.text_to_speech(text)
audio.play_audio(audio_data)

# Speech-to-text example 
print("Speak now...")
audio_data = audio.record_audio(duration=5)
text = audio.speech_to_text(audio_data)
print(f"You said: {text}")

# Audio processing example
processed_audio_data = audio.process_audio(audio_data)
audio.play_audio(processed_audio_data)
```

See the `examples` directory for more detailed usage examples.

## API

### `AudioInterface`

The main interface for the audio library.

#### `text_to_speech(text)`

Convert text to speech.

#### `speech_to_text(audio_data)`

Convert speech to text.

#### `play_audio(audio_data)`

Play audio data.

#### `record_audio(duration)`

Record audio from the microphone for the specified duration (in seconds).

#### `process_audio(audio_data)`

```bash
docker compose up --build
```

```bash
pip install pyaudio
sudo dnf install portaudio-devel redhat-rpm-config
pip install --user pyaudio
```


Process audio data (e.g., noise reduction, format conversion, etc.).

## Contributing

Contributions are welcome! Please see the `CONTRIBUTING.md` file for guidelines.

## License

This project is licensed under the MIT License - see the `LICENSE` file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://python.dobyemail.com",
    "name": "vocochat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Tom Sapletta",
    "author_email": "info@softreck.dev",
    "download_url": "https://files.pythonhosted.org/packages/e8/6e/270b2e14ba1d1889d0d9a1d7e2121ebba6efbf2165fc3353ddeb384b94ab/vocochat-0.1.2.tar.gz",
    "platform": null,
    "description": "# Audio Library\n\nThis is a Python library for audio interface, including text-to-speech (TTS), speech-to-text (STT), audio playback, recording, and processing. It can be used in desktop apps, web apps, and provides a simple API for integration.\n\n## Features\n\n- Text-to-speech conversion\n- Speech-to-text conversion \n- Audio playback\n- Audio recording\n- Audio processing\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/audio-library.git\ncd audio-library\n```\n\n2. Build and run the Docker container:\n\n```bash\ndocker-compose up --build\n```\n\nThis will build the Docker image, install all dependencies (including PortAudio), and run the unit tests.\n\n## Usage\n\nHere's an example of how to use the various features of the library:\n\n```python\nfrom vocochat.audio.audio import AudioInterface\n\naudio = AudioInterface()\n\n# Text-to-speech example\ntext = \"Hello, this is a test of the text-to-speech functionality.\"\naudio_data = audio.text_to_speech(text)\naudio.play_audio(audio_data)\n\n# Speech-to-text example \nprint(\"Speak now...\")\naudio_data = audio.record_audio(duration=5)\ntext = audio.speech_to_text(audio_data)\nprint(f\"You said: {text}\")\n\n# Audio processing example\nprocessed_audio_data = audio.process_audio(audio_data)\naudio.play_audio(processed_audio_data)\n```\n\nSee the `examples` directory for more detailed usage examples.\n\n## API\n\n### `AudioInterface`\n\nThe main interface for the audio library.\n\n#### `text_to_speech(text)`\n\nConvert text to speech.\n\n#### `speech_to_text(audio_data)`\n\nConvert speech to text.\n\n#### `play_audio(audio_data)`\n\nPlay audio data.\n\n#### `record_audio(duration)`\n\nRecord audio from the microphone for the specified duration (in seconds).\n\n#### `process_audio(audio_data)`\n\n```bash\ndocker compose up --build\n```\n\n```bash\npip install pyaudio\nsudo dnf install portaudio-devel redhat-rpm-config\npip install --user pyaudio\n```\n\n\nProcess audio data (e.g., noise reduction, format conversion, etc.).\n\n## Contributing\n\nContributions are welcome! Please see the `CONTRIBUTING.md` file for guidelines.\n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE` file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://python.dobyemail.com"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e92a678462d6b3e46751d31aed195a5582e76d5a2b3a6482a8a6e4ca7faed11",
                "md5": "a404a1b5d1c6f2b191e04d47d027073a",
                "sha256": "1e70f592e511b21b10b069f1ccb076a2fadb64fd2cea525593b3f2c208f59638"
            },
            "downloads": -1,
            "filename": "vocochat-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a404a1b5d1c6f2b191e04d47d027073a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6915,
            "upload_time": "2024-10-15T16:17:00",
            "upload_time_iso_8601": "2024-10-15T16:17:00.274170Z",
            "url": "https://files.pythonhosted.org/packages/8e/92/a678462d6b3e46751d31aed195a5582e76d5a2b3a6482a8a6e4ca7faed11/vocochat-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e86e270b2e14ba1d1889d0d9a1d7e2121ebba6efbf2165fc3353ddeb384b94ab",
                "md5": "161a84b85e35fd28e8c1eaf34dea19ad",
                "sha256": "b3231c192d753f232cbc11402d7f877059e2ccc81fef2a300fcabf0cbc23742a"
            },
            "downloads": -1,
            "filename": "vocochat-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "161a84b85e35fd28e8c1eaf34dea19ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7181,
            "upload_time": "2024-10-15T16:17:01",
            "upload_time_iso_8601": "2024-10-15T16:17:01.471962Z",
            "url": "https://files.pythonhosted.org/packages/e8/6e/270b2e14ba1d1889d0d9a1d7e2121ebba6efbf2165fc3353ddeb384b94ab/vocochat-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 16:17:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vocochat"
}
        
Elapsed time: 0.30545s