speech-engine


Namespeech-engine JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/PraaneshSelvaraj/speech_engine
SummaryPython package for synthesizing text into speech
upload_time2025-01-15 11:39:49
maintainerNone
docs_urlNone
authorPraanesh
requires_pythonNone
licenseNone
keywords speech_engine text2speech text-to-speech tts speech synthesis audio generation natural language processing language processing voice synthesis speech output speech generation language synthesis voice output audio synthesis voice generation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Speech Engine

Speech Engine is a Python package that provides a simple interface for synthesizing text into speech using different TTS engines, including Google Text-to-Speech (gTTS) and Wit.ai Text-to-Speech (Wit TTS).

## Installation

You can install `speech-engine` using pip:

```bash
pip install speech-engine
```

## Usage
### TTS_GOOGLE
```python
from speech_engine import TTS_Google, FileExtensionError

# Instantiate TTS_Google
tts = TTS_Google()

# Set the language and other options
tts.set_language('en')
tts.set_slow(False)

# Synthesize and play speech
tts.speak("Hello, world!")

# Synthesize and save speech as an audio file
try:
    tts.save("Hello, world!", "output.mp3")
except FileExtensionError as e:
    print(e.message)
```

### TTS_Witai
```python
from speech_engine import TTS_Witai

# Instantiate TTS_Witai with the Wit.ai auth token
tts = TTS_Witai(your_authtoken)

# Set the voice
tts.set_voice('Colin')

# Synthesize and play speech
tts.speak("Hello, world!")

# Synthesize and save speech as an audio file
tts.save("Hello, world!", "output.mp3")


# Get available voices
voices = tts.get_voices()
print(voices)
```

### TTS_Openai
```python
from speech_engine import TTS_Openai

# Instantiate TTS_Openai with the Openai Api key
tts = TTS_Openai(your_apikey)

# Set the voice
tts.set_voice('alloy')

# Synthesize and play speech
tts.speak("Hello, world!")

# Synthesize and save speech as an audio file
tts.save("Hello, world!", "output.mp3")


# Get available voices
voices = tts.get_voices()
print(voices)
```
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/PraaneshSelvaraj/speech_engine/blob/main/LICENSE) file for details.

## Contributions
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PraaneshSelvaraj/speech_engine",
    "name": "speech-engine",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "speech_engine, text2speech, text-to-speech, TTS, speech synthesis, audio generation, natural language processing, language processing, voice synthesis, speech output, speech generation, language synthesis, voice output, audio synthesis, voice generation",
    "author": "Praanesh",
    "author_email": "praaneshselvaraj2003@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/82/1a/f293bfe1bee1fc7286b9591ccbb343059645b999916a598368b159357253/speech_engine-0.1.1.tar.gz",
    "platform": null,
    "description": "# Speech Engine\r\n\r\nSpeech Engine is a Python package that provides a simple interface for synthesizing text into speech using different TTS engines, including Google Text-to-Speech (gTTS) and Wit.ai Text-to-Speech (Wit TTS).\r\n\r\n## Installation\r\n\r\nYou can install `speech-engine` using pip:\r\n\r\n```bash\r\npip install speech-engine\r\n```\r\n\r\n## Usage\r\n### TTS_GOOGLE\r\n```python\r\nfrom speech_engine import TTS_Google, FileExtensionError\r\n\r\n# Instantiate TTS_Google\r\ntts = TTS_Google()\r\n\r\n# Set the language and other options\r\ntts.set_language('en')\r\ntts.set_slow(False)\r\n\r\n# Synthesize and play speech\r\ntts.speak(\"Hello, world!\")\r\n\r\n# Synthesize and save speech as an audio file\r\ntry:\r\n    tts.save(\"Hello, world!\", \"output.mp3\")\r\nexcept FileExtensionError as e:\r\n    print(e.message)\r\n```\r\n\r\n### TTS_Witai\r\n```python\r\nfrom speech_engine import TTS_Witai\r\n\r\n# Instantiate TTS_Witai with the Wit.ai auth token\r\ntts = TTS_Witai(your_authtoken)\r\n\r\n# Set the voice\r\ntts.set_voice('Colin')\r\n\r\n# Synthesize and play speech\r\ntts.speak(\"Hello, world!\")\r\n\r\n# Synthesize and save speech as an audio file\r\ntts.save(\"Hello, world!\", \"output.mp3\")\r\n\r\n\r\n# Get available voices\r\nvoices = tts.get_voices()\r\nprint(voices)\r\n```\r\n\r\n### TTS_Openai\r\n```python\r\nfrom speech_engine import TTS_Openai\r\n\r\n# Instantiate TTS_Openai with the Openai Api key\r\ntts = TTS_Openai(your_apikey)\r\n\r\n# Set the voice\r\ntts.set_voice('alloy')\r\n\r\n# Synthesize and play speech\r\ntts.speak(\"Hello, world!\")\r\n\r\n# Synthesize and save speech as an audio file\r\ntts.save(\"Hello, world!\", \"output.mp3\")\r\n\r\n\r\n# Get available voices\r\nvoices = tts.get_voices()\r\nprint(voices)\r\n```\r\n## License\r\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/PraaneshSelvaraj/speech_engine/blob/main/LICENSE) file for details.\r\n\r\n## Contributions\r\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python package for synthesizing text into speech",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/PraaneshSelvaraj/speech_engine"
    },
    "split_keywords": [
        "speech_engine",
        " text2speech",
        " text-to-speech",
        " tts",
        " speech synthesis",
        " audio generation",
        " natural language processing",
        " language processing",
        " voice synthesis",
        " speech output",
        " speech generation",
        " language synthesis",
        " voice output",
        " audio synthesis",
        " voice generation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e071d836604648d02e04988136025de54056c9fc38e5a27765acb18fd05eef2e",
                "md5": "1cf14b38c0d33688e23f2fd726fa39d5",
                "sha256": "503d4420ec6f3e4b0b5a86f4e97324ce72c2a383fea2b4bff39e57a9189e5a40"
            },
            "downloads": -1,
            "filename": "speech_engine-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1cf14b38c0d33688e23f2fd726fa39d5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6805,
            "upload_time": "2025-01-15T11:39:47",
            "upload_time_iso_8601": "2025-01-15T11:39:47.534418Z",
            "url": "https://files.pythonhosted.org/packages/e0/71/d836604648d02e04988136025de54056c9fc38e5a27765acb18fd05eef2e/speech_engine-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "821af293bfe1bee1fc7286b9591ccbb343059645b999916a598368b159357253",
                "md5": "96eee32bff81973e7786a6f3603f7034",
                "sha256": "228b8ce5ca9e00bbb4e4901c008ac7263a9cd75e3caaf26b69538052cda0ef34"
            },
            "downloads": -1,
            "filename": "speech_engine-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "96eee32bff81973e7786a6f3603f7034",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5270,
            "upload_time": "2025-01-15T11:39:49",
            "upload_time_iso_8601": "2025-01-15T11:39:49.968405Z",
            "url": "https://files.pythonhosted.org/packages/82/1a/f293bfe1bee1fc7286b9591ccbb343059645b999916a598368b159357253/speech_engine-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-15 11:39:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PraaneshSelvaraj",
    "github_project": "speech_engine",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "speech-engine"
}
        
Elapsed time: 0.35486s