A Streamlit app that converts books to audio and plays them page by page.
- Upload
.txtor.pdffiles (up to 50 MB) - GitHub repo URL — browse and pick any
.mdor.txtfile from the repo
- Each page's audio is generated on demand using text-to-speech
- The next page's audio is pre-generated in the background while you listen
- Played pages' audio files are deleted automatically to conserve memory
pip install -r requirements.txt
streamlit run app.pyCreate .streamlit/secrets.toml (this file is gitignored):
# Use OpenAI TTS for higher-quality audio (costs ~$0.015/1K characters)
OPENAI_API_KEY = "sk-..."
# Access private GitHub repositories
GITHUB_TOKEN = "ghp_..."- Push this repo to GitHub
- Go to share.streamlit.io → connect the repo → deploy
- Optionally add secrets in the app's Settings → Secrets section