PeaBox Speech Studio is a local-first Python application for AI speech generation, audio and video transcription, subtitle creation, and optional cloud text-to-speech services.
The application combines free local speech models with commercial cloud providers in one Streamlit interface. Users can generate narration with Kokoro, transcribe recordings with Faster-Whisper, discover cloud voices dynamically, export audio and subtitles, and estimate provider costs before generating speech.
- Local neural text-to-speech with Kokoro (Free of cost TTS speech files generation)
- Local speech-to-text with Faster-Whisper
- Microsoft Azure Speech integration
- Amazon Polly integration
- Google Cloud Text-to-Speech integration
- Dynamic cloud voice discovery
- Multiple languages and voice options
- Audio and video transcription
- TXT transcript and SRT subtitle export
- Script character count and indicative cost estimates
- Local model and output storage
- Streamlit web interface
- Windows and Linux support
PeaBox Speech Studio is designed for:
- Course creators and trainers
- YouTube and video creators
- Audiobook and podcast producers
- Consultants and business teams
- Educators and students
- Developers experimenting with speech APIs
- Users who prefer local processing and provider flexibility
Kokoro provides local neural narration without per-character charges. The first generation downloads the required model and voice files. Later generations reuse the files stored in the local models directory.
Available controls include:
- Language selection
- Voice selection
- Speaking speed
- Output filename
- In-browser playback
- WAV download
- API-key and region-based connection
- Dynamic voice discovery
- Locale filtering
- Voice metadata display
- Speaking-rate adjustment
- Pitch adjustment
- MP3 generation and download
- AWS access-key authentication
- Optional temporary session token
- Configurable AWS region
- Standard, neural, generative, and long-form engines
- Dynamic compatible-voice discovery
- MP3 generation and download
- Service-account JSON authentication
- Language-code filtering
- Dynamic voice discovery
- Voice sample-rate information
- MP3 generation and download
Faster-Whisper processes supported audio and video locally. The application uses CPU-compatible INT8 inference by default.
Supported input formats include:
- WAV
- MP3
- M4A
- FLAC
- OGG
- MP4
- MOV
- MKV
- WebM
Available transcription models include:
- tiny
- base
- small
- medium
- large-v3
Exports include:
- Plain-text transcript
- SRT subtitle file
- Timestamped segment table
The temporary-file workflow includes a Windows file-lock correction. The application closes the temporary file descriptor before Faster-Whisper opens the media and retries cleanup when Windows briefly retains a lock.
PeaBox-Speech-Studio/
├── app.py
├── requirements.txt
├── start_windows.bat
├── start_linux_mac.sh
├── README.md
├── INSTALLATION.md
├── LICENSE
├── .gitignore
├── data/
├── models/
└── outputs/
models/
Stores downloaded local speech models and voice data.
outputs/
Stores generated WAV and MP3 files, transcripts, and subtitle files.
data/
Reserved for local application data and future project history.
- Install 64-bit Python 3.12.
- Clone or download this repository.
- Delete any
.venvfolder created with another Python version. - Run
start_windows.bat. - Open
http://localhost:8501if the browser does not open automatically.
sudo apt update
sudo apt install -y python3.12 python3.12-venv ffmpeg espeak-ng git
git clone https://github.com/iwebslogtech/PeaBox-Speech-Studio.git
cd PeaBox-Speech-Studio
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python -m streamlit run app.pySee INSTALLATION.md for detailed Windows, Linux, FFmpeg, Kokoro, and cloud-provider setup.
- Create a Speech resource: https://portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices
- Azure Speech documentation: https://learn.microsoft.com/azure/ai-services/speech-service/
- Azure Speech pricing: https://azure.microsoft.com/pricing/details/speech/
- Create an AWS account: https://aws.amazon.com/free/
- AWS access-key guide: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
- Amazon Polly console: https://console.aws.amazon.com/polly/
- Amazon Polly pricing: https://aws.amazon.com/polly/pricing/
- Create a Google Cloud project: https://console.cloud.google.com/projectcreate
- Enable the Text-to-Speech API: https://console.cloud.google.com/apis/library/texttospeech.googleapis.com
- Manage service accounts: https://console.cloud.google.com/iam-admin/serviceaccounts
- Google Cloud TTS pricing: https://cloud.google.com/text-to-speech/pricing
The application calculates indicative provider costs from the number of characters in the script and the selected pricing family.
Displayed estimates are for planning only. Actual billing can vary because of:
- Provider free tiers
- Account credits
- Region
- Voice or model family
- Currency conversion
- Taxes
- Enterprise agreements
- Provider price changes
Always treat the provider invoice and current pricing page as authoritative.
- Local Kokoro generation remains on the machine.
- Faster-Whisper transcription remains on the machine.
- Cloud speech text is sent to the selected cloud provider when a cloud provider is used.
- Credentials entered in the app should remain limited to the active Streamlit session.
- Credentials must never be committed to GitHub.
- Google service-account JSON files must not be copied into the repository.
- Use least-privilege IAM roles and rotate exposed credentials immediately.
- Do not expose the Streamlit port directly to the public internet without authentication and TLS.
Use only audio, voices, and recordings that you are authorized to process. Do not use PeaBox Speech Studio to impersonate individuals, mislead listeners, commit fraud, or create deceptive attribution.
Generated speech should be disclosed as synthetic when the context could otherwise mislead an audience.
Delete the current environment and recreate it explicitly:
rmdir /s /q .venv
py -3.12 -m venv .venvConfirm that the environment is using Python 3.12:
.venv\Scripts\python.exe --versionIf the output shows Python 3.13, delete .venv and recreate it with py -3.12.
Run Streamlit through the active Python interpreter:
.venv\Scripts\python.exe -m streamlit run app.pyInstall FFmpeg and reopen the terminal. Verify:
ffmpeg -versionThe first run downloads the model and voice files. Check whether files are appearing in models/. Later generations should not repeat the download.
Check:
- API credentials
- Provider region
- Enabled service or API
- IAM permissions
- Billing status
- Firewall and proxy settings
Create and activate a Python 3.12 environment, then install dependencies:
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python -m streamlit run app.pyOn Windows:
py -3.12 -m venv .venv
call .venv\Scripts\activate.bat
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python -m streamlit run app.pyPotential future enhancements include:
- Batch speech generation
- Project history and job queue
- DOCX, PDF, and PowerPoint narration
- Pronunciation dictionaries
- Multi-speaker scripts
- Audiobook chapter management
- VTT subtitle export
- Speaker diarization
- Translation-assisted dubbing
- Desktop packaging
- Docker deployment
- REST API
- Authenticated multi-user deployment
Contributions are welcome.
- Fork the repository.
- Create a feature branch.
- Make focused changes.
- Test on a clean Python 3.12 environment.
- Do not include API keys, model files, generated media, or personal recordings.
- Submit a pull request with a clear description and testing notes.
This application is released under the MIT License unless the repository states otherwise. Third-party libraries, cloud services, and downloaded models retain their respective licences and terms.