From 44e812bdb78b0e97972a0214fc576dac12f1919f Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 3 Nov 2023 23:51:31 +0800 Subject: [PATCH] Revert "select audio device" This reverts commit 6fa960a3c8c2d23cc21c367846ab72d505b7d2ed. --- src/app.tsx | 2 -- src/settings.tsx | 48 ------------------------------------------------ 2 files changed, 50 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 854becd..0e32477 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -43,7 +43,6 @@ export interface ChatStore { develop_mode: boolean; whisper_api: string; whisper_key: string; - audioDeviceID: string; } const _defaultAPIEndpoint = "https://api.openai.com/v1/chat/completions"; @@ -81,7 +80,6 @@ const newChatStore = ( develop_mode: getDefaultParams("dev", dev), whisper_api: getDefaultParams("whisper-api", whisper_api), whisper_key: getDefaultParams("whisper-key", whisper_key), - audioDeviceID: "", }; }; diff --git a/src/settings.tsx b/src/settings.tsx index ecd9cb6..2c7b07b 100644 --- a/src/settings.tsx +++ b/src/settings.tsx @@ -249,8 +249,6 @@ export default (props: { const [totalCost, setTotalCost] = useState(getTotalCost()); // @ts-ignore const { langCode, setLangCode } = useContext(langCodeContext); - // type is MediaDeviceInfo - const [devices, setDevices] = useState([] as MediaDeviceInfo[]); useEffect(() => { const handleKeyPress = (event: any) => { @@ -411,52 +409,6 @@ export default (props: { help="用于 Whisper 服务的 key,默认为 上方使用的OPENAI key,可在此单独配置专用key" {...props} /> - -

- - {devices.length === 0 && ( - - )} - {devices.length > 0 && ( - - )} -

-

{Tr("Accumulated cost in all sessions")} ${totalCost.toFixed(4)}