balibabu commited on
Commit
8ee6bdd
·
1 Parent(s): 51e8d71

feat: Add tts Switch to chat configuration modal #2088 (#2206)

Browse files

### What problem does this PR solve?

feat: Add tts Switch to chat configuration modal #2088

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/src/locales/en.ts CHANGED
@@ -427,6 +427,9 @@ The above is the content you need to summarize.`,
427
  uploadFailed: 'Upload failed',
428
  regenerate: 'Regenerate',
429
  read: 'Read content',
 
 
 
430
  },
431
  setting: {
432
  profile: 'Profile',
 
427
  uploadFailed: 'Upload failed',
428
  regenerate: 'Regenerate',
429
  read: 'Read content',
430
+ tts: 'Text to speech',
431
+ ttsTip:
432
+ 'To play the voice using voice conversion, please select TTS (speech conversion model) in the settings first.',
433
  },
434
  setting: {
435
  profile: 'Profile',
web/src/locales/zh-traditional.ts CHANGED
@@ -397,6 +397,8 @@ export default {
397
  uploadFailed: '上傳失敗',
398
  regenerate: '重新生成',
399
  read: '朗讀內容',
 
 
400
  },
401
  setting: {
402
  profile: '概述',
 
397
  uploadFailed: '上傳失敗',
398
  regenerate: '重新生成',
399
  read: '朗讀內容',
400
+ tts: '文字轉語音',
401
+ ttsTip: '是否用語音轉換播放語音,請先在設定裡面選擇TTS(語音轉換模型)。',
402
  },
403
  setting: {
404
  profile: '概述',
web/src/locales/zh.ts CHANGED
@@ -414,6 +414,8 @@ export default {
414
  uploadFailed: '上传失败',
415
  regenerate: '重新生成',
416
  read: '朗读内容',
 
 
417
  },
418
  setting: {
419
  profile: '概要',
 
414
  uploadFailed: '上传失败',
415
  regenerate: '重新生成',
416
  read: '朗读内容',
417
+ tts: '文本转语音',
418
+ ttsTip: '是否用语音转换播放语音,请先在设置里面选择TTS(语音转换模型)。',
419
  },
420
  setting: {
421
  profile: '概要',
web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx CHANGED
@@ -99,6 +99,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
99
  >
100
  <Switch />
101
  </Form.Item>
 
 
 
 
 
 
 
 
 
102
  <KnowledgeBaseItem></KnowledgeBaseItem>
103
  </section>
104
  );
 
99
  >
100
  <Switch />
101
  </Form.Item>
102
+ <Form.Item
103
+ label={t('tts')}
104
+ valuePropName="checked"
105
+ name={['prompt_config', 'tts']}
106
+ tooltip={t('ttsTip')}
107
+ initialValue={false}
108
+ >
109
+ <Switch />
110
+ </Form.Item>
111
  <KnowledgeBaseItem></KnowledgeBaseItem>
112
  </section>
113
  );