Build powerful speech applications with our Text-to-Speech and Speech Recognition APIs.
Services
| Feature | Description |
|---|---|
| Text-to-Speech | Convert text to natural speech with Arabic and English voices |
| Speech Recognition | Transcribe audio to text with multi-language support |
| API Reference | Interactive API documentation with playground |
| Performance | Performance tuning and optimization guide |
| API Limits | Service limits and best practices |
Getting Started in 5 Minutes
Get up and running with SM-AI-MODELS in just a few minutes.
Prerequisites
- SM-AI-MODELS services running locally or on a server
curlor any HTTP client
1. Check Service Health
First, verify the services are running:
Code
Expected response:
Code
2. Generate Your First Speech
Convert text to speech with a simple POST request:
Code
This will create a welcome.mp3 file with the synthesized speech.
3. Transcribe Audio
Convert an audio file to text:
Code
Response:
Code
Service Endpoints
Both services provide REST and gRPC APIs for flexibility and performance.
| Service | REST Port | gRPC Port | Description |
|---|---|---|---|
| SM-TTS-V1 | 9999 | 50051 | Text-to-Speech service |
| SM-STT-V1 | 8088 | 50052 | Speech Recognition service |
API Options:
- REST API — Simple HTTP JSON endpoints, easy testing with cURL
- gRPC API — High performance, type-safe, streaming support
Learn more: gRPC Guide
Available Voices
| Voice | Language | Description |
|---|---|---|
| Yara | Arabic | Female voice (default) |
| Nouf | Arabic | Female voice |
| Yara_en | English | Female voice |
Try Different Voices
Arabic - Yara (Default)
Code
Arabic - Nouf
Code
English - Yara_en
Code
Custom Audio Format
Request a different audio format:
Code
Supported formats: mp3, wav, opus, flac
Guides & Documentation
| Guide | Description |
|---|---|
| REST API Reference | Complete TTS and ASR endpoint documentation |
| Streaming API | WebSocket and gRPC streaming for real-time audio |
| cURL Examples | Comprehensive cURL and grpcurl examples |
| gRPC Guide | Use gRPC APIs for high performance |
| Python Integration | Python code examples |
| Node.js Integration | JavaScript/TypeScript examples |
| Error Handling | Handle errors properly |
gRPC Health Check
Both services implement the standard gRPC health check protocol:
Code
Made with ❤️ using UNICODE
Last modified on
