Make technical text speakable! Sayable is a Python package that transforms technical text into a format that's friendly for text-to-speech systems, powered by Claude AI.
- Transforms technical jargon into speech-friendly text
- Handles URLs, IP addresses, and technical notation
- Expands abbreviations and acronyms
- Smart formatting for numbers and special characters
- Rate limiting for API efficiency
- Configurable system prompts
pip install sayable
For development:
git clone [repository-url]
cd sayable
pip install -r requirements.txt
from sayable import SayableAssistant
# Initialize the assistant
assistant = SayableAssistant()
# Transform technical text
text = "The server at 192.168.1.1:8080 returned a 404 error"
speakable = assistant.transform(text)
print(speakable)
# Output: "The server at IP address one nine two dot one six eight..."
- Set your Anthropic API key:
export ANTHROPIC_API_KEY='your-api-key'
- (Optional) Create a
config.yaml
file to customize the system prompt:
sayable_system_prompt: |
Your custom system prompt here
pytest tests/
black .
isort .
flake8 .
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
Sayable includes several custom exception classes:
SayableError
: Base exception classSayableAPIError
: API-related errorsSayableInputError
: Invalid input errorsConfigurationError
: Configuration issues
MIT License - see LICENSE file for details