@ducci/jarvis 1.0.87 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server/fish-audio.js +8 -2
package/package.json
CHANGED
package/src/server/fish-audio.js
CHANGED
|
@@ -26,7 +26,7 @@ Rules:
|
|
|
26
26
|
- Choose emotions that fit the content: use (confident) or (calm) for informational answers,
|
|
27
27
|
(excited) or (satisfied) for completed tasks, (curious) for questions, etc.
|
|
28
28
|
- You may combine two tags on one sentence: (excited)(soft tone) Great news!
|
|
29
|
-
-
|
|
29
|
+
- Plain text only — no emojis, no markdown, no code blocks, no bullet points, no special characters.
|
|
30
30
|
- Keep technical jargon minimal; explain concepts simply as you would speak them.
|
|
31
31
|
- Match the language of the original response.
|
|
32
32
|
|
|
@@ -89,7 +89,13 @@ export async function textToSpeech(text, config) {
|
|
|
89
89
|
throw new Error(`fish.audio TTS ${response.status}: ${errText.slice(0, 200)}`);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
// Explicitly collect all streaming chunks — arrayBuffer() can miss trailing chunks
|
|
93
|
+
// on chunked transfer-encoded responses from fish.audio.
|
|
94
|
+
const chunks = [];
|
|
95
|
+
for await (const chunk of response.body) {
|
|
96
|
+
chunks.push(chunk);
|
|
97
|
+
}
|
|
98
|
+
return Buffer.concat(chunks);
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
/**
|