使用java通过LAN进行语音传输?

发布于 2024-08-29 05:09:14 字数 265 浏览 1 评论 0原文

我正在构建一个在 LAN 环境中工作的 java 应用程序,该 LAN 上的每台计算机都安装了该应用程序,在某些时候,我需要该应用程序根据以下机制:

  1. LAN 中只有一台计算机可以使用麦克风发送语音(管理员)
  2. 所有计算机同时接收该语音(当然使用我的应用程序)
  3. 会话结束后,语音应记录在管理员计算机上。

谁能告诉我如何使用 java 进行语音传输?
什么java库可以帮助我做到这一点?

请帮忙,谢谢

I'm building a java application which works in a LAN environment, every computer on that LAN have this application installed on it, at some point i need this application to transfer voice simultaneously to all computer over the LAN (voice broadcasting) according to the following mechanism:

  1. Only one computer of the LAN can send voice using a microphone(the administrator)
  2. All computers receive that voice simultaneously (of course using my application)
  3. The voice should be recorded on the administrator computer after finishing the session.

Could anyone give me an idea of how to use java in working with voice transmission?
What java library can help me do that?

Please help, thank you

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

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

发布评论

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

评论(2

已下线请稍等 2024-09-05 05:09:14

您可能需要查看服务器部分的ECF。您可以设置发布/订阅模型,其中只有服务器可以发布,但每个客户端都有权订阅服务器。

此时,我会将 XMPP 视为协议(ECF 开箱即用地支持该协议)。 XMPP 加上扩展是 Google 在 Google Voice 中使用的,因此它已经被证明并且看起来会存在一段时间。查看 xmpp.org 了解一些 Java 库。

JRL 提到的 JMF 是一些相当古老的技术,但它对于从麦克风抓取声音以及在文件系统上存储语音文件可能很有用。

You might want to look at ECF for the server portion. You could set up a publish/subscribe model where only the server can publish but each of your clients has access to subscribe to the server.

At this point I would look at XMPP as the protocol (ECF supports this protocol out of the box). XMPP plus extensions is what Google uses for Google Voice so it is proven and it looks like it will be around for awhile. Take a look at xmpp.org for some Java libraries.

JMF as mentioned by JRL is some pretty old technology but it might be useful for grabbing sound from the microphone and for storing a voice file on the filesystem.

待天淡蓝洁白时 2024-09-05 05:09:14

JMF。我曾尝试使用 JMF 实现多个启用语音的客户端,但由于无法使其工作而放弃。如果我没记错的话,它与克隆数据接收器或类似的东西有关。虽然有关于如何执行此操作的示例,但对于我的具体情况,我无法弄清楚如何执行此操作。祝你好运!

There's JMF. I tried to do multiple voice enabled clients with JMF once, and abandoned because I couldn't get it to work. If I remember correctly, it had to do with cloning the datasinks or something to that effect. There's examples on how to do this though, but for my specific situation I couldn't figure out how to do it. Good luck!

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