FreeTTS输出mp3需要哪些库?
我正在尝试部署一个使用 FreeTTS 生成 mp3 的 java web 应用程序。
根据项目网站上的说明,我已经复制了整个库。当它不起作用时,我尝试了其他方法并尝试了每个目录,现在我在 tts 目录和 tts/lib 中都拥有所有库目录:
- cmudict04.jar
- cmulex.jar
- cmu_time_awb.jar
- cmutimelex.jar
- cmu_us_kal.jar
- en_us.jar
- freetts.jar
- lame_enc.dll
- lametritonus.dll
- liblametritonus.so
- libmp3lame.so
- libPCM2MP3Linux.so
- litebody-tts.jar
- PCM2MP3.dll
- tritonus_mp3-0.3.6.jar
- 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:
- cmudict04.jar
- cmulex.jar
- cmu_time_awb.jar
- cmutimelex.jar
- cmu_us_kal.jar
- en_us.jar
- freetts.jar
- lame_enc.dll
- lametritonus.dll
- liblametritonus.so
- libmp3lame.so
- libPCM2MP3Linux.so
- litebody-tts.jar
- PCM2MP3.dll
- tritonus_mp3-0.3.6.jar
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题似乎在于 Tritonus 只能在 32 位版本的 Java 上运行。
The problem, it seems, it that Tritonus will only run on 32 bit versions of Java.