FreeTTS输出mp3需要哪些库?

发布于 2024-12-26 12:37:23 字数 1248 浏览 3 评论 0原文

我正在尝试部署一个使用 FreeTTS 生成 mp3 的 java web 应用程序。

根据项目网站上的说明,我已经复制了整个库。当它不起作用时,我尝试了其他方法并尝试了每个目录,现在我在 tts 目录和 tts/lib 中都拥有所有库目录:

  1. cmudict04.jar
  2. cmulex.jar
  3. cmu_time_awb.jar
  4. cmutimelex.jar
  5. cmu_us_kal.jar
  6. en_us.jar
  7. freetts.jar
  8. lame_enc.dll
  9. lametritonus.dll
  10. liblametritonus.so
  11. libmp3lame.so
  12. libPCM2MP3Linux.so
  13. litebody-tts.jar
  14. PCM2MP3.dll
  15. tr​​itonus_mp3-0.3.6.jar
  16. tritonus_share-0.3.6.jar

但是,当我发出请求时,仍然收到以下错误

java.lang.IllegalArgumentException: Unsupported conversion: MPEG1L3 from PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian
        at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:876)
        at ServerType.FreeTTS.Mp3FileAudioPlayer.close(Unknown Source)
        at ServerType.FreeTTS.FreeTTS.speak(Unknown Source)
        at ServerType.FreeTTS.FreeTTS.processInput(Unknown Source)
        at server.TTSThread.run(Unknown Source)

:我的理解是这与 .wav (PCM_SIGNED) 和 MP3 之间的转换有关(MPEG1L3)。

我还需要哪些其他库?其中哪些对我没有任何作用?我在这里缺少什么吗?

I'm trying to deploy a java web app which uses FreeTTS to generate mp3s.

As per the directions on the project website, I've copied across a whole load of libraries. When it didn't work, I tried others and played around with the directory each was in, to the point where I now have all the libs in both the tts directory and the tts/lib directory:

  1. cmudict04.jar
  2. cmulex.jar
  3. cmu_time_awb.jar
  4. cmutimelex.jar
  5. cmu_us_kal.jar
  6. en_us.jar
  7. freetts.jar
  8. lame_enc.dll
  9. lametritonus.dll
  10. liblametritonus.so
  11. libmp3lame.so
  12. libPCM2MP3Linux.so
  13. litebody-tts.jar
  14. PCM2MP3.dll
  15. tritonus_mp3-0.3.6.jar
  16. tritonus_share-0.3.6.jar

However, when I make a request, I still get the following error:

java.lang.IllegalArgumentException: Unsupported conversion: MPEG1L3 from PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian
        at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:876)
        at ServerType.FreeTTS.Mp3FileAudioPlayer.close(Unknown Source)
        at ServerType.FreeTTS.FreeTTS.speak(Unknown Source)
        at ServerType.FreeTTS.FreeTTS.processInput(Unknown Source)
        at server.TTSThread.run(Unknown Source)

It's my understanding that this is to do with the conversion between a .wav (PCM_SIGNED) and an MP3 (MPEG1L3).

What other libraries do I need? Which of these are doing nothing for me? Is there something I'm missing here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奶气 2025-01-02 12:37:23

问题似乎在于 Tritonus 只能在 32 位版本的 Java 上运行。

The problem, it seems, it that Tritonus will only run on 32 bit versions of Java.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文