@ray-js/t-agent-ui-ray 0.2.8-beta.8 → 0.2.8-beta.9

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.
@@ -96,6 +96,7 @@ declare const _default: {
96
96
  't-agent.error.timeout': string;
97
97
  't-agent.error.asr-empty': string;
98
98
  't-agent.error.audio-packet-invalid': string;
99
+ 't-agent.error.audio-not-found': string;
99
100
  't-agent.message.delete.button': string;
100
101
  };
101
102
  'zh-Hant': {
@@ -195,6 +196,7 @@ declare const _default: {
195
196
  't-agent.error.timeout': string;
196
197
  't-agent.error.asr-empty': string;
197
198
  't-agent.error.audio-packet-invalid': string;
199
+ 't-agent.error.audio-not-found': string;
198
200
  't-agent.message.delete.button': string;
199
201
  };
200
202
  en: {
@@ -294,6 +296,7 @@ declare const _default: {
294
296
  't-agent.error.timeout': string;
295
297
  't-agent.error.asr-empty': string;
296
298
  't-agent.error.audio-packet-invalid': string;
299
+ 't-agent.error.audio-not-found': string;
297
300
  't-agent.message.delete.button': string;
298
301
  };
299
302
  ja: {
@@ -393,6 +396,7 @@ declare const _default: {
393
396
  't-agent.error.timeout': string;
394
397
  't-agent.error.asr-empty': string;
395
398
  't-agent.error.audio-packet-invalid': string;
399
+ 't-agent.error.audio-not-found': string;
396
400
  't-agent.message.delete.button': string;
397
401
  };
398
402
  de: {
@@ -492,6 +496,7 @@ declare const _default: {
492
496
  't-agent.error.timeout': string;
493
497
  't-agent.error.asr-empty': string;
494
498
  't-agent.error.audio-packet-invalid': string;
499
+ 't-agent.error.audio-not-found': string;
495
500
  't-agent.message.clear-history.button': string;
496
501
  };
497
502
  fr: {
@@ -591,6 +596,7 @@ declare const _default: {
591
596
  't-agent.error.timeout': string;
592
597
  't-agent.error.asr-empty': string;
593
598
  't-agent.error.audio-packet-invalid': string;
599
+ 't-agent.error.audio-not-found': string;
594
600
  't-agent.message.clear-history.button': string;
595
601
  };
596
602
  es: {
@@ -690,6 +696,7 @@ declare const _default: {
690
696
  't-agent.error.timeout': string;
691
697
  't-agent.error.asr-empty': string;
692
698
  't-agent.error.audio-packet-invalid': string;
699
+ 't-agent.error.audio-not-found': string;
693
700
  't-agent.message.clear-history.button': string;
694
701
  };
695
702
  it: {
@@ -789,6 +796,7 @@ declare const _default: {
789
796
  't-agent.error.timeout': string;
790
797
  't-agent.error.asr-empty': string;
791
798
  't-agent.error.audio-packet-invalid': string;
799
+ 't-agent.error.audio-not-found': string;
792
800
  't-agent.message.clear-history.button': string;
793
801
  };
794
802
  };
@@ -97,6 +97,7 @@ export default {
97
97
  't-agent.error.timeout': '发送超时',
98
98
  't-agent.error.asr-empty': '语音识别结果为空',
99
99
  't-agent.error.audio-packet-invalid': '暂不支持该文本的朗读',
100
+ 't-agent.error.audio-not-found': '语音已过期',
100
101
  't-agent.message.delete.button': '删除消息'
101
102
  },
102
103
  'zh-Hant': {
@@ -196,6 +197,7 @@ export default {
196
197
  't-agent.error.timeout': '發送超時',
197
198
  't-agent.error.asr-empty': '語音識別結果為空',
198
199
  't-agent.error.audio-packet-invalid': '暫不支持該文本的朗讀',
200
+ 't-agent.error.audio-not-found': '語音已過期',
199
201
  't-agent.message.delete.button': '刪除消息'
200
202
  },
201
203
  en: {
@@ -295,6 +297,7 @@ export default {
295
297
  't-agent.error.timeout': 'Sending timeout',
296
298
  't-agent.error.asr-empty': 'Voice recognition result is empty',
297
299
  't-agent.error.audio-packet-invalid': 'Reading this text aloud is not supported yet',
300
+ 't-agent.error.audio-not-found': 'Audio has expired',
298
301
  't-agent.message.delete.button': 'Delete Message'
299
302
  },
300
303
  ja: {
@@ -394,6 +397,7 @@ export default {
394
397
  't-agent.error.timeout': '送信タイムアウト',
395
398
  't-agent.error.asr-empty': '音声認識結果が空です',
396
399
  't-agent.error.audio-packet-invalid': 'このテキストの読み上げには対応していません',
400
+ 't-agent.error.audio-not-found': '音声の有効期限が切れました',
397
401
  't-agent.message.delete.button': 'メッセージを削除'
398
402
  },
399
403
  de: {
@@ -493,6 +497,7 @@ export default {
493
497
  't-agent.error.timeout': 'Sendetimeout',
494
498
  't-agent.error.asr-empty': 'Spracherkennungsergebnis ist leer',
495
499
  't-agent.error.audio-packet-invalid': 'Das Vorlesen dieses Textes wird noch nicht unterstützt',
500
+ 't-agent.error.audio-not-found': 'Audio ist abgelaufen',
496
501
  't-agent.message.clear-history.button': 'Verlauf löschen'
497
502
  },
498
503
  fr: {
@@ -592,6 +597,7 @@ export default {
592
597
  't-agent.error.timeout': "Délai d'envoi dépassé",
593
598
  't-agent.error.asr-empty': 'Le résultat de la reconnaissance vocale est vide',
594
599
  't-agent.error.audio-packet-invalid': "La lecture à voix haute de ce texte n'est pas encore prise en charge",
600
+ 't-agent.error.audio-not-found': "L'audio a expiré",
595
601
  't-agent.message.clear-history.button': "Effacer l'historique"
596
602
  },
597
603
  es: {
@@ -691,6 +697,7 @@ export default {
691
697
  't-agent.error.timeout': 'Tiempo de envío agotado',
692
698
  't-agent.error.asr-empty': 'El resultado del reconocimiento de voz está vacío',
693
699
  't-agent.error.audio-packet-invalid': 'La lectura en voz alta de este texto aún no es compatible',
700
+ 't-agent.error.audio-not-found': 'El audio ha caducado',
694
701
  't-agent.message.clear-history.button': 'Borrar historial'
695
702
  },
696
703
  it: {
@@ -790,6 +797,7 @@ export default {
790
797
  't-agent.error.timeout': 'Timeout di invio',
791
798
  't-agent.error.asr-empty': 'Il risultato del riconoscimento vocale è vuoto',
792
799
  't-agent.error.audio-packet-invalid': 'La lettura ad alta voce di questo testo non è ancora supportata',
800
+ 't-agent.error.audio-not-found': "L'audio è scaduto",
793
801
  't-agent.message.clear-history.button': 'Cancella cronologia'
794
802
  }
795
803
  };
@@ -46,14 +46,23 @@ const BubbleToolTile = props => {
46
46
  action: 'toggle'
47
47
  });
48
48
  } catch (e) {
49
- if (e && e.code && e.code === AIStreamAppErrorCode.AUDIO_PACKET_INVALID) {
50
- ty.showToast({
51
- icon: 'none',
52
- title: t('t-agent.error.audio-packet-invalid')
53
- });
54
- } else {
55
- logger.error('BubbleToolTile toggle audio failed', e);
49
+ if (e && e.code) {
50
+ if (e.code === AIStreamAppErrorCode.AUDIO_PACKET_INVALID) {
51
+ ty.showToast({
52
+ icon: 'none',
53
+ title: t('t-agent.error.audio-packet-invalid')
54
+ });
55
+ return;
56
+ }
57
+ if (e.code === AIStreamAppErrorCode.FILE_DATA_READ_ERROR) {
58
+ ty.showToast({
59
+ icon: 'none',
60
+ title: t('t-agent.error.audio-not-found')
61
+ });
62
+ return;
63
+ }
56
64
  }
65
+ logger.error('BubbleToolTile toggle audio failed', e);
57
66
  }
58
67
  }
59
68
  }), /*#__PURE__*/React.createElement(View, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent-ui-ray",
3
- "version": "0.2.8-beta.8",
3
+ "version": "0.2.8-beta.9",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -41,5 +41,5 @@
41
41
  "@types/echarts": "^4.9.22",
42
42
  "@types/markdown-it": "^14.1.1"
43
43
  },
44
- "gitHead": "98ec699238fdf0f1ad9c4404e46d0dca5583cebe"
44
+ "gitHead": "c56f397e86b83f47e11a838b64aa59dd7d189efe"
45
45
  }