PlayNote API
to take a PDF source file, synthesize it into an audio conversation between two voices, and retrieve the generated podcast URL.
Prerequisites
Before you start, ensure you have the following:- Access your credentials (API key and user ID)
- Development environment for your chosen programming language
- Python’s
requests
library installed (pip install requests
)
Steps
1
Set Up Environment Variables
Add your API key and user ID to your environment variables.
2
Configure API Access
Create a script with the following authentication setup:
3
Send Request to Generate PlayNote
Configure and send the request to create your podcast:
4
Poll for Completion
Check the status of your PlayNote generation:
5
Run and Test
Follow these steps to run your code:
- Save your code as
playnote_generator.py
- Open terminal in your code directory
- Run:
python3 playnote_generator.py
- Wait for the generation process to complete
- Access your generated audio using the provided URL
Complete Code
Troubleshooting
If you encounter issues, check these common problems:-
Authentication Issues:
- Verify your API key and user ID are correctly set in your environment
- Confirm the
AUTHORIZATION
header is properly formatted
-
Source File Issues:
- Ensure your PDF URL is publicly accessible
- Verify the PDF file is not corrupted or password-protected
-
Generation Time:
- The process typically takes 5-10 minutes depending on the PDF size
- If the status remains “generating” for an extended period, try creating a new request
-
API Endpoint Errors:
- Verify you’re using the correct PlayNote API endpoint
- Check that your request payload matches the expected format