Metadata-Version: 2.4
Name: speech_engine
Version: 0.2.0
Summary: Python package for synthesizing text into speech
Author-email: Praanesh <praaneshselvaraj2003@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/PraaneshSelvaraj/speech_engine
Project-URL: Repository, https://github.com/PraaneshSelvaraj/speech_engine
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
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gtts>=2.5.4
Requires-Dist: playsound>=1.3.0
Requires-Dist: openai>=2.1.0
Requires-Dist: pyaudio>=0.2.14
Requires-Dist: pydub>=0.25.1
Provides-Extra: dev
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# 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.wav")


# 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)
```

### TTS_Deepgram
```python
from speech_engine import TTS_Deepgram

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

# Set the voice
tts.set_voice('aura-angus-en')

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

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


# 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.
