Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect Error: [object Object] #20

Open
qingfengmy opened this issue Oct 30, 2024 · 1 comment
Open

Connect Error: [object Object] #20

qingfengmy opened this issue Oct 30, 2024 · 1 comment

Comments

@qingfengmy
Copy link

import { MsEdgeTTS, OUTPUT_FORMAT } from "msedge-tts";

(async () => {
  try {
    const tts = new MsEdgeTTS();
    await tts.setMetadata("en-US-AriaNeural", OUTPUT_FORMAT.WEBM_24KHZ_16BIT_MONO_OPUS).catch(e => {
      console.log("An error occurred:");
      console.error(e);
    });
    const filePath = await tts.toFile("./example_audio.webm", "Hi, how are you?");
  } catch (error) {
    console.log("An error catch:");
    console.error(error);
  }
})();

An error occurred:
Connect Error: [object Object]
An error catch:
No audio data received
node:internal/process/promises:389

@aoaoms
Copy link

aoaoms commented Oct 31, 2024

maybe need to change default agent? I see the err have occurred only Chinese mainland areas, other similar repos have also appeared, , edge-tts
最近才出现的,国内使用会出现ws连接失败。看到其他类似库里有提相同的错误,并已经有修复的;可以尝试改默认代理设置修复一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants