ugly-app 0.1.286 → 0.1.288

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.
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.1.286";
1
+ export declare const CLI_VERSION = "0.1.288";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by prebuild — do not edit manually
2
- export const CLI_VERSION = "0.1.286";
2
+ export const CLI_VERSION = "0.1.288";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugly-app",
3
- "version": "0.1.286",
3
+ "version": "0.1.288",
4
4
  "type": "module",
5
5
  "main": "./dist/server/index.js",
6
6
  "exports": {
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by prebuild — do not edit manually
2
- export const CLI_VERSION = "0.1.286";
2
+ export const CLI_VERSION = "0.1.288";
@@ -209,6 +209,7 @@ function useTTSAnalyzer() {
209
209
  const init = useCallback(() => {
210
210
  if (ctxRef.current) return;
211
211
  const ctx = new AudioContext({ sampleRate: 24000 });
212
+ void ctx.resume();
212
213
  const node = ctx.createAnalyser();
213
214
  node.fftSize = 2048;
214
215
  const gain = ctx.createGain();
@@ -225,6 +226,7 @@ function useTTSAnalyzer() {
225
226
  const ctx = ctxRef.current;
226
227
  const gain = gainRef.current;
227
228
  if (!ctx || !gain) return;
229
+ if (ctx.state === 'suspended') void ctx.resume();
228
230
  const binary = atob(base64Audio);
229
231
  const bytes = new Uint8Array(binary.length);
230
232
  for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
@@ -295,7 +297,8 @@ function STTSection({ socket }: { socket: UglyBotSocket }) {
295
297
  }),
296
298
  socket.on('stt:error', (data) => {
297
299
  if (data.streamId && data.streamId !== streamId) return;
298
- addLog(`STT error: ${data.message ?? 'unknown'}`, 'err');
300
+ const errMsg = typeof data.message === 'string' ? data.message : JSON.stringify(data.message ?? data);
301
+ addLog(`STT error: ${errMsg}`, 'err');
299
302
  stopListening();
300
303
  }),
301
304
  socket.on('stt:stopped', (data) => {