mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-17 16:56:37 +08:00
refactor: 恢复runtime代码,去除调试console代码
This commit is contained in:
parent
e836dc0db8
commit
221229ce2f
@ -108,7 +108,6 @@ export class QwenApi implements LLMApi {
|
|||||||
speed: options.speed,
|
speed: options.speed,
|
||||||
response_format: options.response_format,
|
response_format: options.response_format,
|
||||||
};
|
};
|
||||||
console.log("[Request] alibaba speech payload: ", requestPayload);
|
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
options.onController?.(controller);
|
options.onController?.(controller);
|
||||||
try {
|
try {
|
||||||
|
@ -1299,7 +1299,6 @@ function _Chat() {
|
|||||||
let audioBuffer: ArrayBuffer | AudioBuffer;
|
let audioBuffer: ArrayBuffer | AudioBuffer;
|
||||||
const { markdownToTxt } = require("markdown-to-txt");
|
const { markdownToTxt } = require("markdown-to-txt");
|
||||||
const textContent = markdownToTxt(text);
|
const textContent = markdownToTxt(text);
|
||||||
console.log("[OpenAI Speech] textContent: ", textContent);
|
|
||||||
if (config.ttsConfig.engine === "Edge") {
|
if (config.ttsConfig.engine === "Edge") {
|
||||||
const edgeVoiceName = accessStore.edgeVoiceName();
|
const edgeVoiceName = accessStore.edgeVoiceName();
|
||||||
const tts = new MsEdgeTTS();
|
const tts = new MsEdgeTTS();
|
||||||
@ -1324,7 +1323,6 @@ function _Chat() {
|
|||||||
voice: config.ttsConfig.voice,
|
voice: config.ttsConfig.voice,
|
||||||
speed: config.ttsConfig.speed,
|
speed: config.ttsConfig.speed,
|
||||||
})) {
|
})) {
|
||||||
console.log("[Stream Speech] add to queue", chunk);
|
|
||||||
ttsPlayer.addToQueue(chunk);
|
ttsPlayer.addToQueue(chunk);
|
||||||
}
|
}
|
||||||
ttsPlayer.finishStreamPlay();
|
ttsPlayer.finishStreamPlay();
|
||||||
|
@ -9,9 +9,9 @@ import { ServiceProvider } from "@/app/constant";
|
|||||||
|
|
||||||
const providers = [ServiceProvider.OpenAI, ServiceProvider.Azure];
|
const providers = [ServiceProvider.OpenAI, ServiceProvider.Azure];
|
||||||
|
|
||||||
const models = ["gpt-4o-realtime-preview-2024-10-01", "qwen-tts-realtime"];
|
const models = ["gpt-4o-realtime-preview-2024-10-01"];
|
||||||
|
|
||||||
const voice = ["alloy", "shimmer", "echo","Chelsie"];
|
const voice = ["alloy", "shimmer", "echo"];
|
||||||
|
|
||||||
export function RealtimeConfigList(props: {
|
export function RealtimeConfigList(props: {
|
||||||
realtimeConfig: RealtimeConfig;
|
realtimeConfig: RealtimeConfig;
|
||||||
|
@ -22,7 +22,6 @@ export const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;
|
|||||||
export const BYTEDANCE_BASE_URL = "https://ark.cn-beijing.volces.com";
|
export const BYTEDANCE_BASE_URL = "https://ark.cn-beijing.volces.com";
|
||||||
|
|
||||||
export const ALIBABA_BASE_URL = "https://dashscope.aliyuncs.com/api/";
|
export const ALIBABA_BASE_URL = "https://dashscope.aliyuncs.com/api/";
|
||||||
export const ALIBABA_RUNTIEM_TTS_URL = "wss://dashscope.aliyuncs.com/api-ws/v1/realtime";
|
|
||||||
|
|
||||||
export const TENCENT_BASE_URL = "https://hunyuan.tencentcloudapi.com";
|
export const TENCENT_BASE_URL = "https://hunyuan.tencentcloudapi.com";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user