@fonoster/apiserver 0.7.55 → 0.7.57
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.
|
@@ -105,8 +105,8 @@ class ElevenLabs extends AbstractTextToSpeech_1.AbstractTextToSpeech {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
observeQueue();
|
|
108
|
-
chunks.forEach((
|
|
109
|
-
this.doSynthesize(
|
|
108
|
+
chunks.forEach((text, index) => {
|
|
109
|
+
this.doSynthesize({ text, voice, model: options.model })
|
|
110
110
|
.then((synthesizedText) => {
|
|
111
111
|
results[index] = synthesizedText;
|
|
112
112
|
})
|
|
@@ -117,13 +117,15 @@ class ElevenLabs extends AbstractTextToSpeech_1.AbstractTextToSpeech {
|
|
|
117
117
|
return { ref, stream };
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
doSynthesize(
|
|
120
|
+
doSynthesize(params) {
|
|
121
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const { text, voice, model } = params;
|
|
123
|
+
console.log("xxxxxxxx doSynthesize", text, voice, model);
|
|
122
124
|
const response = yield this.client.generate({
|
|
123
125
|
stream: true,
|
|
124
126
|
voice,
|
|
125
127
|
text,
|
|
126
|
-
model_id: "
|
|
128
|
+
model_id: model !== null && model !== void 0 ? model : "eleven_flash_v2_5",
|
|
127
129
|
output_format: "pcm_16000"
|
|
128
130
|
});
|
|
129
131
|
return (yield (0, streamToBuffer_1.streamToBuffer)(response));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.57",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@deepgram/sdk": "^3.5.1",
|
|
24
|
-
"@fonoster/common": "^0.7.
|
|
25
|
-
"@fonoster/identity": "^0.7.
|
|
26
|
-
"@fonoster/logger": "^0.7.
|
|
27
|
-
"@fonoster/sipnet": "^0.7.
|
|
28
|
-
"@fonoster/streams": "^0.7.
|
|
29
|
-
"@fonoster/types": "^0.7.
|
|
24
|
+
"@fonoster/common": "^0.7.56",
|
|
25
|
+
"@fonoster/identity": "^0.7.56",
|
|
26
|
+
"@fonoster/logger": "^0.7.56",
|
|
27
|
+
"@fonoster/sipnet": "^0.7.56",
|
|
28
|
+
"@fonoster/streams": "^0.7.56",
|
|
29
|
+
"@fonoster/types": "^0.7.56",
|
|
30
30
|
"@google-cloud/speech": "^6.6.0",
|
|
31
31
|
"@google-cloud/text-to-speech": "^5.3.0",
|
|
32
32
|
"@grpc/grpc-js": "~1.10.6",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"@types/uuid": "^10.0.0",
|
|
73
73
|
"@types/validator": "^13.12.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "6049222cffcda692472cf27efc2af216c73bcf47"
|
|
76
76
|
}
|