feat: add fish audio plugin#1382
Conversation
also added support for autoloading .env.local in dev mode
🦋 Changeset detectedLatest commit: 701f66d The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Verified locally |
| req.on('error', (err) => { | ||
| if (err.name === 'AbortError') return; | ||
| this.#logger.error({ err }, 'Fish Audio TTS request error'); | ||
| if (!doneFut.done) doneFut.reject(err); | ||
| }); | ||
| req.write(payload); | ||
| req.end(); |
There was a problem hiding this comment.
🔴 Missing req.on('close') handler causes ChunkedStream.run() to hang indefinitely on abort
When the abort signal fires before the HTTP response is received, doneFut is never settled, causing await doneFut.await at line 285 to hang forever. The req.on('error') handler at line 276 silently returns for AbortError without settling doneFut, and the response callback (which contains the res.on('close') that resolves doneFut) is never invoked because no response was received. The Cartesia plugin (plugins/cartesia/src/tts.ts:272-274), which uses the identical node:https request pattern, includes a req.on('close', () => { if (!doneFut.done) doneFut.resolve(); }) handler that settles doneFut in this exact scenario. The Fish Audio plugin is missing this handler.
| req.on('error', (err) => { | |
| if (err.name === 'AbortError') return; | |
| this.#logger.error({ err }, 'Fish Audio TTS request error'); | |
| if (!doneFut.done) doneFut.reject(err); | |
| }); | |
| req.write(payload); | |
| req.end(); | |
| req.on('error', (err) => { | |
| if (err.name === 'AbortError') return; | |
| this.#logger.error({ err }, 'Fish Audio TTS request error'); | |
| if (!doneFut.done) doneFut.reject(err); | |
| }); | |
| req.on('close', () => { | |
| if (!doneFut.done) doneFut.resolve(); | |
| }); | |
| req.write(payload); | |
| req.end(); |
Was this helpful? React with 👍 or 👎 to provide feedback.
also added support for autoloading .env.local in dev mode