Repository navigation
Add elevenlabs-tts extension - #15992
lachiejames wants to merge 3 commits into
Conversation
- docs: update README (raycast#23) - docs: add changelog (raycast#22) - feat: add Node.js version management and CI unit testing workflow (raycast#21) - security: bump cross-spawn to 7.0.6 (raycast#20) - fix: removes refs to default hotkey (raycast#19) - fix: refactor into separate files (raycast#18) - fix: add more comments (raycast#17) - fix: add unit tests (raycast#16) - fix: refactor into AudioManager (raycast#15) - fix: remove \'play-sound\' dependency (raycast#14) - Revert "fix: refactor into separate files (raycast#10)" (raycast#13) - Revert "fix: add more README instructions (raycast#11)" (raycast#12) - fix: add more README instructions (raycast#11) - fix: refactor into separate files (raycast#10) - feat: rename extension to \'ElevenLabs TTS\' (raycast#9) - fix: update extension icon (raycast#8) - fix: run prettier (raycast#7) - fix: pin dependencies (raycast#6) - fix: add more comments (raycast#5) - fix: add more logging and error handling (raycast#4) - fix: use websockets for faster TTS streaming (raycast#3) - fix: add toasts for UI feedback (raycast#2) - feat: use elevenlabs for TTS since it\'s better (raycast#1) - initial commit
|
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days 🎄 Once the PR is approved and merged, the extension will be available on our Store. |
There was a problem hiding this comment.
I deleted these files and republished, but they haven't been removed from this PR. Possible bug in npm run publish?
|
Wow that's a very cool extension! Love the approach for streaming the audio 👌 |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
- Can we show an error tost if the API is wrong? Right now it just shows "Playing..."
I'm looking forward to testing this extension again 🔥
Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.
| /** | ||
| * Preferences configurable through Raycast's UI | ||
| * These settings affect voice generation quality and characteristics | ||
| */ | ||
| export interface Preferences { | ||
| elevenLabsApiKey: string; // API key from ElevenLabs dashboard | ||
| voiceId: string; // Selected voice identifier | ||
| stability: string; // Voice stability (0.0-1.0) | ||
| similarityBoost: string; // Voice clarity enhancement (0.0-1.0) | ||
| } | ||
|
|
There was a problem hiding this comment.
| /** | |
| * Preferences configurable through Raycast's UI | |
| * These settings affect voice generation quality and characteristics | |
| */ | |
| export interface Preferences { | |
| elevenLabsApiKey: string; // API key from ElevenLabs dashboard | |
| voiceId: string; // Selected voice identifier | |
| stability: string; // Voice stability (0.0-1.0) | |
| similarityBoost: string; // Voice clarity enhancement (0.0-1.0) | |
| } |
You don't need to manually set preference types as this is autogenerated in raycast-env.d.tsx
There was a problem hiding this comment.
Hi @pernielsentikaer 👋,
Thanks for your feedback and for testing the extension! I wanted to give you an update on the situation and link you to a related issue I've opened for the underlying problem.
I encountered a series of issues while attempting to update this PR (#15992). The root cause seems to be related to how the npm run publish command handles moved or deleted files.
While trying to resolve this, I followed the workflow recommended by the error messages and ran npx @raycast/api@latest pull-contributions, but this failed with a Git fast-forward error. Eventually, I deleted the local .config/raycast/public-extensions-fork folder and reran npm run publish. However, this created a new PR instead of updating the existing one.
Here’s the issue I raised to document the problem in detail: #16142
The new PR for this extension is here: #16140.
There was a problem hiding this comment.
By the way, your suggestions have been committed
Relates to raycast/extensions#15992 (comment) ## Changes - Removed manual `Preferences` interface from `types.ts` in favor of auto-generated types from `raycast-env.d.ts` - Updated preference type annotations to use `Preferences.SpeakSelected` namespace - Simplified imports by removing redundant preference type ## Motivation The Raycast framework auto-generates preference types in `raycast-env.d.ts` based on the extension's manifest. This change removes duplicate type definitions and uses the official typing system, improving type safety and maintainability. ## Testing - Verified that all preference values are correctly typed and accessible - Confirmed that voice settings are properly parsed from preferences - Ensured existing functionality continues to work as expected
Relates to raycast/extensions#15992 (review) ### TL;DR Added API key validation before establishing WebSocket connections in the AudioManager. ### What changed? - Added `node-fetch` as a new dependency - Implemented a new `validateApiKey` method in AudioManager that checks the API key against the ElevenLabs API - Modified the `initializeStream` method to validate API keys before attempting WebSocket connections ### How to test? 1. Try connecting with a valid ElevenLabs API key - should work as expected 2. Try connecting with an invalid API key - should receive an error before WebSocket connection attempt 3. Verify that the validation checks against the `/v1/voices` endpoint ### Why make this change? To provide better error handling and user feedback by validating API keys early in the connection process, rather than waiting for WebSocket connection failures. This prevents unnecessary connection attempts with invalid credentials and provides clearer error messages to users.

Description
ElevenLabs TTS is a powerful text-to-speech extension that brings premium AI voices to Raycast. Simply select any text in any application, trigger the command with your hotkey, and hear natural-sounding speech instantly.
Key features:
Screencast
Watch Demo
Technical Implementation Highlights
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder