Unverified Commit 5d8fa2c7 authored by Charlie.Wei's avatar Charlie.Wei Committed by GitHub

Tts add voice choose (#2452)

Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM>
Co-authored-by: 's avatarcrazywoola <427733928@qq.com>
Co-authored-by: 's avatarcrazywoola <100913391+crazywoola@users.noreply.github.com>
parent 58df5e53
......@@ -69,7 +69,9 @@ const VoiceParamConfig: FC = () => {
>
<div className={'relative h-9'}>
<Listbox.Button className={'w-full h-full rounded-lg border-0 bg-gray-100 py-1.5 pl-3 pr-10 sm:text-sm sm:leading-6 focus-visible:outline-none focus-visible:bg-gray-200 group-hover:bg-gray-200 cursor-pointer'}>
<span className={classNames('block truncate text-left', !languageItem?.name && 'text-gray-400')}>{languageItem?.name ?? localLanguagePlaceholder}</span>
<span className={classNames('block truncate text-left', !languageItem?.name && 'text-gray-400')}>
{t(`common.voice.language.${languageItem?.value.replace('-', '')}`) ?? localLanguagePlaceholder}
</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronDownIcon
className="h-5 w-5 text-gray-400"
......@@ -97,7 +99,8 @@ const VoiceParamConfig: FC = () => {
>
{({ /* active, */ selected }) => (
<>
<span className={classNames('block', selected && 'font-normal')}>{item.name}</span>
<span
className={classNames('block', selected && 'font-normal')}>{t(`common.voice.language.${(item.value).toString().replace('-', '')}`)}</span>
{(selected || item.value === textToSpeechConfig.language) && (
<span
className={classNames(
......
......@@ -39,6 +39,18 @@ const translation = {
input: 'Please enter',
select: 'Please select',
},
voice: {
language: {
zhHans: 'Chinese',
enUS: 'English',
deDE: 'German',
frFR: 'French',
esES: 'Spanish',
itIT: 'Italian',
thTH: 'Thai.',
idID: 'Indonesian',
},
},
unit: {
char: 'chars',
},
......
......@@ -41,6 +41,18 @@ const translation = {
useYourModel: 'Atualmente usando seu próprio provedor de modelo.',
close: 'Fechar',
},
voice: {
language: {
zhHans: 'chinês',
enUS: 'inglês',
deDE: 'alemão',
frFR: 'francês',
esES: 'espanhol',
itIT: 'italiano',
thTH: 'tailandês',
idID: 'indonésio',
},
},
anthropicHosted: {
anthropicHosted: 'Anthropic Claude',
onTrial: 'EM TESTE',
......
......@@ -39,6 +39,18 @@ const translation = {
input: '请输入',
select: '请选择',
},
voice: {
language: {
zhHans: '中文',
enUS: '英语',
deDE: '德语',
frFR: '法语',
esES: '西班牙语',
itIT: '意大利语',
thTH: '泰语',
idID: '印尼语',
},
},
unit: {
char: '个字符',
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment