简体   繁体   English

是否可以通过蓝牙从PC向Android设备发送/接收语音

[英]Is it possible to send/receive voice from PC to Android device over Bluetooth

I have a PC (where java program is running), Bluetooth dongle (which supports A2DP) and Android device (2.3.6, which also supports A2DP). 我有一台PC(正在运行Java程序),蓝牙加密狗(支持A2DP)和Android设备(2.3.6,它也支持A2DP)。

I want to: 我想要:

  1. Send real time voice data from PC's microphone to android device via bluetooth 通过蓝牙将实时语音数据从PC的麦克风发送到android设备
  2. Send real time voice data from Android device's microphone to PC via bluetooth 通过蓝牙将实时语音数据从Android设备的麦克风发送到PC

I found this question , where Dennis says that "Phones are typically only Source devices (Source of the stream that can stream to sink devices), Sinks are Headsets or Bluetooth speakers.". 我发现了这个问题 ,丹尼斯说:“电话通常只是信源设备(可以流向信宿设备的流的源),信宿是耳机或蓝牙扬声器。” So it seems it is possible to implement case 2? 因此,似乎有可能实现案例2? Or not? 或不? And what about case 1, is it impossible to implement? 那么,情况1不可能实现吗?

It is true that Android phone are uniquely A2DP source devices. 的确,Android手机是唯一的A2DP 设备。

Sadly, your first case is impossible to realize if you decide to rely on the A2DP profile for streaming audio, because Android does not implement the required callbacks supposed to be handling BlueZ's advertisings when a remote device wants to stream audio to your phone. 可悲的是,如果您决定依赖A2DP配置文件来传输音频,则第一种情况是不可能实现的,因为当远程设备要将音频流传输到您的手机时,Android并没有实现要求的回调,该回调应用于处理BlueZ的广告。

The second use case is possible , given that you have a bluetooth enabled PC and some awesome apps that will decode and route the sound from the Bluetooth stack to the speakers. 假设您有一台启用了蓝牙的PC和一些很棒的应用程序,它们将解码声音并将其从蓝牙堆栈传送到扬声器,则第二种用例是可能的。 I managed once to reproduce this use case using PulseAudio and pulseaudio-module-bluetooth on Ubuntu 12.10 . 我曾经设法在Ubuntu 12.10上使用PulseAudiopulseaudio-module-bluetooth重现此用例。

Here is a working example showing how to manage the routing of the sound once a connected BT device begins to stream. 是一个工作示例,显示了已连接的BT设备开始流式传输后如何管理声音的路由。 Here is another one. 是另一个。 They both take place on Linux and I never did this on Windows though. 它们都发生在Linux上,但是我从未在Windows上执行过。

For the sake of completeness, here is another SO answer written by me, giving details about how to implement A2DP sink capabilities on Android. 为了完整起见, 是我写的另一个SO答案,其中提供了有关如何在Android上实现A2DP 功能的详细信息。

EDIT : 编辑:

Nothing forbids you to implement your own protocol for audio streaming via Bluetooth on an Android device, this will work, but as it will not be a standard, it will never comply with the system built-in Bluetooth profiles (A2DP, HFP ...). 没有什么可以禁止您在Android设备上实现自己的协议以通过蓝牙进行音频流传输的,但是可以使用,但是由于它不是标准,因此它永远不会符合系统内置的蓝牙配置文件(A2DP,HFP ... )。

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

相关问题 通过蓝牙android发送和接收语音消息 - send and receive voice message via bluetooth android 是否可以通过蓝牙从麦克风接收音频并从设备播放音频? - Is it possible to receive audio from microphone over Bluetooth and play it from device? 蓝牙-通过蓝牙从PC和Android设备向硬件设备发送消息是否一样? - Bluetooth - Is a sending a message over Bluetooth to a hardware device from a PC and from an Android Device the same thing? 如何从PC向Android设备发送和接收对象 - How to send and receive an object from PC to an Android Device PC 上的 Windows .NET 通过蓝牙从 Android 手机发送/接收文件 - Windows .NET on PC send/receive files from Android phone o0ver Bluetooth 使用bluecove将数据从android蓝牙发送到PC - Send data from android bluetooth to PC with bluecove 通过蓝牙将字符串发送到Arduino上的Android设备 - Send String Over Bluetooth to Android Device on Arduino 在 Android 应用程序中从蓝牙设备接收数据 - Receive data from Bluetooth device in Android app Android通过蓝牙将应用程序中的文件/数据发送到PC /打印机/扫描仪/其他设备 - Android send file/data from application through Bluetooth to the PC/printer/scanner/another device 如何通过蓝牙从 android 应用程序向电脑发送键盘命令? - How can I send keyboard commands to pc from android app over bluetooth?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM