This Val Town app converts Wikipedia articles into conversational podcast episodes. It:
To use this app, you'll need to set up the following environment variables in Val Town:
OPENAI_API_KEY
: Your OpenAI API keyGOOGLE_APPLICATION_CREDENTIALS
: Your Google Cloud credentials JSON (stringified)Make a POST request to the HTTP endpoint with a JSON body containing:
{ "article": "Article_Title_Or_URL", "voices": ["en-US-Neural2-F", "en-US-Neural2-D"] // Optional: Specify Google TTS voices }
The app will return a link to the generated audio file.
index.ts
: Main HTTP handlerwikipedia.ts
: Wikipedia article fetchingopenai.ts
: Script generation with OpenAItts.ts
: Google Text-to-Speech integrationfrontend/
: Simple web interface for the app