@pie-players/tts-client-server 0.3.65 → 0.3.67
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/dist/ServerTTSProvider.js +10 -0
- package/package.json +2 -2
|
@@ -364,6 +364,7 @@ class ServerTTSProviderImpl {
|
|
|
364
364
|
activeSynthesisController = null;
|
|
365
365
|
synthesisRunId = 0;
|
|
366
366
|
telemetryReporter;
|
|
367
|
+
onPlaybackStart;
|
|
367
368
|
onWordBoundary;
|
|
368
369
|
constructor(config, adapter) {
|
|
369
370
|
this.config = config;
|
|
@@ -403,7 +404,16 @@ class ServerTTSProviderImpl {
|
|
|
403
404
|
}
|
|
404
405
|
// Setup event handlers
|
|
405
406
|
audio.onplay = () => {
|
|
407
|
+
if (runId !== this.synthesisRunId || this.currentAudio !== audio) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
406
410
|
this.pausedState = false;
|
|
411
|
+
try {
|
|
412
|
+
this.onPlaybackStart?.();
|
|
413
|
+
}
|
|
414
|
+
catch (error) {
|
|
415
|
+
console.warn("[ServerTTSProvider] playback-start callback failed:", error);
|
|
416
|
+
}
|
|
407
417
|
// Start word highlighting
|
|
408
418
|
if (this.onWordBoundary && this.wordTimings.length > 0) {
|
|
409
419
|
this.startWordHighlighting();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/tts-client-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "Client-side TTS provider that calls server API for synthesis",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@pie-players/pie-tts": "0.3.
|
|
41
|
+
"@pie-players/pie-tts": "0.3.67"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "^5.9.3",
|