6drf21e / ChatTTS_colab

🚀 一键部署(含离线整合包)!基于 ChatTTS ,支持流式输出、音色抽卡、长音频生成和分角色朗读。简单易用,无需复杂安装。
1.96k stars 245 forks source link

英文语音有问题 #32

Open QiYusheng opened 3 months ago

QiYusheng commented 3 months ago

测试文本: Turning once again, and this time more generally, to the question of invasion, I would observe that there has never been a period in all these long centuries of which we boast when an absolute guarantee against invasion, 同样的文本在huggingface那个forge页面上测试结果没有问题。 但是是此项目本地部署英文部分会有“”喵喵喵“”的发音

当我对点击那个预处理停顿词时文本变成了如下样子;

turningonceagain [uv_break] , andthi 秒 ti 米 e 米 oregenerally , totheque 秒 tionofinva 秒 ion , iwouldob 秒 ervethatthereha [uv_break] 秒 neverbeenaperiodinallthe 秒 elongcenturie 秒 ofwhichweboa 秒 twhenanab 秒 oluteguaranteeagain 秒 tinva 秒 ion

6drf21e commented 3 months ago

是最新版吗? 最新版修正了这个问题,之前代码正则化的时候没有支持英文。

colab的截图(从项目首页点进去): image 整合包004测试也正常

QiYusheng commented 3 months ago

网盘下载的。0.0.4

QiYusheng commented 3 months ago

我找到问题了,我的文本是一段中文一段英文,类似这样

中文你有没有看过一拳超人这部动画片? 动画片中,没有任何天赋的主人公玉奇,在一个满是超人的社会里面。 纯粹依靠肌肉训练就成为了整个动画片中的最强存在。 他使用一个让人都不看好的方式,纯粹依靠大力出奇迹的蛮干。成为了让人无法理解的最强人物。 Turning once again, and this time more generally, to the question of invasion, I would observe that there has never been a period in all these long centuries of which we boast when an absolute guarantee against invasion,

纯英文是没问题的,

6drf21e commented 3 months ago

看来还需要优化下

luojwen120 commented 3 months ago

版本3bb64a5 我也遇到了这个问题,英文转语音就报错。

输入全英文内容,但各项参数配置都未调整: image

后台报错“ModuleNotFoundError: No module named 'tn.english'”: image

我分别安装'tn'模块的0.0.2,0.0.3,0.0.4版本,但是依然报上述错误。python版本3.11.9。我对python不是很懂,如有知道什么问题的,麻烦指点一下,多谢

@6drf21e 麻烦也看看这个问题。

6drf21e commented 3 months ago

pip install WeTextProcessing 试一下 @luojwen120

6drf21e commented 3 months ago

chattts-[seed_2][speed_4][oral_0][laugh_0][break_5][2024-06-14_195543].zip 我这边测试这段英文正常。

luojwen120 commented 3 months ago

pip install WeTextProcessing 试一下 @luojwen120

我卸载了tn模块,并安装了WeTextProcessing 。问题得到了解决。多谢大佬

tiny-andr commented 3 months ago

macmini M2 尝试pip install Cython之后再pip install WeTextProcessing提示 ERROR: Failed building wheel for pynini Failed to build pynini ERROR: Could not build wheels for pynini, which is required to install pyproject.toml-based projects

目前还没找到咋解决 /头秃

daymade commented 3 months ago

@tiny-andr This error indicates that the compilation of the pynini package is failing due to missing dependencies. Specifically, it's unable to find the 'fst/util.h' header file, which is part of the OpenFst library. Here's what you can do to resolve this:

  1. Install OpenFst: OpenFst is a prerequisite for pynini. You need to install it on your system. On macOS, you can use Homebrew:

    brew install openfst

    If you don't have Homebrew, you can install it from https://brew.sh/

  2. Set environment variables: After installing OpenFst, you need to set some environment variables so that the compiler can find the necessary headers and libraries:

    export CPLUS_INCLUDE_PATH="/usr/local/include"
    export LIBRARY_PATH="/usr/local/lib"
  3. Retry installation: Now try installing pynini again:

    pip install pynini==2.1.5

[!TIP] step 3 can take a long time (around 5~10 minutes!) to compile wheels and consume high CPU with a clang process

  1. After successfully installing pynini, try installing WeTextProcessing again:

    pip install WeTextProcessing pynini==2.1.5

If you're still encountering issues, it might be related to your specific macOS version or Python environment. In that case, you might want to consider:

  1. Using a different Python version
  2. Creating a new virtual environment
  3. Checking if there are any compatibility issues between the versions of pynini, OpenFst, and your Python version

Let me know if you need any further assistance or if you encounter any other errors after trying these steps.

[!WARNING] there is still a block bug #49 after you solved the pynini's error, keep tuned~