Metadata-Version: 2.1
Name: speech-engine
Version: 0.0.2
Summary: Python package for synthesizing text into speech
Home-page: https://github.com/PraaneshSelvaraj/speech_engine
Author: Praanesh
Author-email: praaneshselvaraj2003@gmail.com
License: UNKNOWN
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
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Requires-Dist: gtts
Requires-Dist: playsound

# 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.lang = 'en'
tts.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, InvalidTokenError, FileExtensionError

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

# Check if the provided token is valid
if not tts.is_valid_token:
    raise InvalidTokenError()

# Set the voice
tts.voice = 'Colin'

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

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


