简体   繁体   English

使用Java在LAN上进行语音传输?

[英]Voice transmission over LAN using 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: 我正在构建一个可在LAN环境中工作的Java应用程序,该LAN上的每台计算机上都安装了该应用程序,在某些时候,我需要该应用程序根据LAN同时将语音传输到LAN上的所有计算机(语音广播)。以下机制:

  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? 谁能给我一个关于如何在语音传输中使用Java的想法?
What java library can help me do that? 什么Java库可以帮助我做到这一点?

Please help, thank you 请帮忙,谢谢

There's JMF . JMF I tried to do multiple voice enabled clients with JMF once, and abandoned because I couldn't get it to work. 我曾经尝试用JMF做多个启用语音的客户端,但由于无法正常工作而被放弃了。 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! 祝好运!

You might want to look at ECF for the server portion. 您可能要查看服务器部分的ECF 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作为协议(ECF开箱即用地支持该协议)。 XMPP plus extensions is what Google uses for Google Voice so it is proven and it looks like it will be around for awhile. XMPP plus扩展名是Google用于Google语音的功能,因此它已经得到证明,并且似乎已经存在了一段时间。 Take a look at xmpp.org for some Java libraries. 查看一些Java库的xmpp.org

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. JRL提到的JMF是一项相当古老的技术,但是它对于从麦克风获取声音并将语音文件存储在文件系统中可能很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM