tts add voice choose (#2391)

Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM>
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
Charlie.Wei
2024-02-15 22:41:18 +08:00
committed by GitHub
parent e47b5b43b8
commit 300d9892a5
35 changed files with 746 additions and 92 deletions

View File

@@ -30,6 +30,7 @@ import type {
MoreLikeThisConfig,
PromptConfig,
PromptVariable,
TextToSpeechConfig,
} from '@/models/debug'
import type { ExternalDataTool } from '@/models/common'
import type { DataSet } from '@/models/datasets'
@@ -98,8 +99,10 @@ const Configuration: FC = () => {
const [speechToTextConfig, setSpeechToTextConfig] = useState<MoreLikeThisConfig>({
enabled: false,
})
const [textToSpeechConfig, setTextToSpeechConfig] = useState<MoreLikeThisConfig>({
const [textToSpeechConfig, setTextToSpeechConfig] = useState<TextToSpeechConfig>({
enabled: false,
voice: '',
language: '',
})
const [citationConfig, setCitationConfig] = useState<MoreLikeThisConfig>({
enabled: false,
@@ -246,6 +249,8 @@ const Configuration: FC = () => {
})
setTextToSpeechConfig(modelConfig.text_to_speech || {
enabled: false,
voice: '',
language: '',
})
setCitationConfig(modelConfig.retriever_resource || {
enabled: false,