Contributing
How to run tests, add new providers, and contribute to Orate.
Thank you for your interest in contributing to Orate! This guide will help you get started with development, testing, and adding new providers.
Development Setup
- Fork and clone the repository
- Install dependencies with
pnpm install
Adding a New Provider
To add a new AI provider to Orate, follow these steps:
- Create a new file in
src/
for your provider e.g.openai.ts
- Add TypeScript types for the provider's models and voices if applicable
- Implement the provider interface:
- Add tests in
__tests__/yourProvider.test.ts
- Add documentation in
website/content/docs/yourProvider.mdx
- Update the providers list in
website/app/(home)/components/providers.tsx
- Add an example snippet to
website/app/(home)/components/text-to-speech/index.tsx
and/orwebsite/app/(home)/components/speech-to-text/index.tsx
Environment Variables
Each provider has its own test file that verifies both text-to-speech and speech-to-text functionality where applicable. You'll need to set up the appropriate environment variables for the providers you want to test.
Required environment variables for testing existing providers:
- OpenAI:
OPENAI_API_KEY
- ElevenLabs:
ELEVENLABS_API_KEY
- AssemblyAI:
ASSEMBLYAI_API_KEY
- Google:
GOOGLE_API_KEY
,GOOGLE_RECOGNIZER
- IBM:
IBM_TTS_API_KEY
,IBM_TTS_URL
,IBM_STT_API_KEY
,IBM_STT_URL
- Azure:
AZURE_API_KEY
,AZURE_REGION
- Gladio:
GLADIO_API_KEY
- Murf:
MURF_API_KEY
- Deepgram:
DEEPGRAM_API_KEY
- Rev:
REV_API_KEY
Running Tests
Orate uses Vitest for testing. The test files can be found in the __tests__
directory.
To run the tests:
This should output a list of tests that have been run e.g.
Code Style
Orate uses Biome with the Ultracite configuration for code formatting and linting. You can follow the setup guide on the Ultracite website.
Once setup correctly, it should format your code automatically when you save. If not, you can run npx ultracite
to format your code.
Submitting a Pull Request
- Create a new branch for your changes
- Make your changes and commit them with descriptive messages
- Push your branch to your fork
- Submit a pull request to the main Orate repository
Thank you for your contribution!
Writing Documentation
The documentation is built using Next.js and Fumadocs. To run the documentation site locally, cd
into the website
directory and run:
Documentation is written in Markdown and can be found in the website/content/docs
directory. The meta.json
file contains the metadata for the documentation pages.
Questions?
If you have any questions about contributing, please open a GitHub issue or contact me on X.