Skip to content

Commit c7c1344

Browse files
committed
update README
1 parent 07d0f67 commit c7c1344

File tree

2 files changed

+38
-204
lines changed

2 files changed

+38
-204
lines changed

Android/README.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

README.md

Lines changed: 38 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,73 @@
11
# Android Microphone
22

3-
Use your Android phone as a microphone to Windows PC
3+
Use your Android phone as a microphone to PC
44

55
------
66

7-
## Requirements
8-
* Android phone with bluetooth/wifi
9-
* Windows PC with bluetooth/wifi
10-
* Installed [Virtual Audio Cable (VAC)](https://vac.muzychenko.net/en/) on Windows, will hear "trial" voice if your driver is in trial mode\
11-
Also try using [VB-Audio](https://vb-audio.com/Cable/) as alternative now since it is completely free
7+
## How to Use
128

13-
------
14-
15-
## How to use
16-
17-
<details>
18-
<summary>Config Audio Device</summary>
19-
20-
1. Run Windows side app
21-
2. Select audio speaker from drop down list to the one that VB created\
22-
<img src="Assets/sound_config1.png" width="300" alt="sound config1">
23-
3. Use the corresponding microphone created by VB\
24-
<img src="Assets/sound_config2.png" width="300" alt="sound config2">
25-
4. In `Properties` of both, make sure both set default format to following:\
26-
<img src="Assets/sound_config4.png" width="300" alt="sound config4">
27-
5. For speaker, click `Configure Speakers` and set channel to `Mono`:\
28-
<img src="Assets/sound_config3.png" width="300" alt="sound config3">
29-
6. For microphone, click `Properties` and set following:\
30-
<img src="Assets/sound_config5.png" width="300" alt="sound config5">
31-
32-
On my machine, this setup has the lowest delay and best sound quality.\
33-
Can further improve audio latency by opening `VBCABLE_ControlPanel.exe` (from downloaded folder of VB) and set `Max Latency` in Options to 2048 smp:\
34-
<img src="Assets/sound_config6.png" width="600" alt="sound config6">
35-
36-
Do not set to 512 smp since that will cause most buffers lost. If 2048 has no sound or bad quality, consider a higher smp.
37-
38-
</details>
9+
### PC Side
3910

40-
<details>
41-
<summary>Volume Control</summary>
42-
43-
1. Run Windows side app
44-
2. Drag slider to control volume
11+
__Start the app__: The installer will be released in the future. For now, make sure rust and cargo are installed on the system and run following command to build the app:
12+
```
13+
cd RustApp
14+
cargo run --release
15+
```
4516

46-
</details>
17+
__Pick an output audio device__: You will see a list of audio player devices from the dropdown list. Here you want to choose a device that is wired to the virtual mic device on your system that you will be using.
4718

4819
<details>
49-
<summary>Connection: Bluetooth</summary>
20+
<summary>
21+
More about output device
22+
</summary>
5023

51-
1. Make sure PC and phone are paired once
52-
2. Check `Bluetooth` button on Windows app
53-
3. Click `Connect` on Windows app to start server
54-
4. Click `Connect` on Android app to connect
55-
5. Tap `Record Audio` on Android app to start transferring audio
24+
The step is system independent.
5625

26+
On Windows you can use [Virtual Audio Cable](https://vac.muzychenko.net/en/download.htm) or [VB Cable](https://vb-audio.com/Cable/). Both software will install virtual input and output audio devices on your system. After that map the output player device to the input mic device so any audio our app played to the device is transferred to the virtual mic device.
5727
</details>
5828

59-
<details>
60-
<summary>Connection: Wifi / LAN</summary>
29+
__Choose a connection method__: This is how your phone will be connected to your PC and stream audio from the mic.
6130

62-
1. Make sure PC and phone are under the same network
63-
1. Can be under the same router with Wifi
64-
2. Can have PC connected to ethernet of the same router
65-
3. Can have PC connected to phone by cable and enable USB tethering on phone
66-
2. Click `Connect` on Windows app to start server
67-
3. Click `Connect` on Android app to connect
68-
4. Enter `IP` and `Port` (displayed on Windows side) on Android app
69-
5. Tap `Record Audio` on Android app to start transferring audio
31+
For TCP & UDP, connect your phone and PC to the same internet.
7032

71-
</details>
33+
For USB serial, connect your phone to PC with a cable.
7234

7335
<details>
74-
<summary>Advanced Filters</summary>
75-
76-
1. Run Windows side app
77-
2. Connect phone to app
78-
3. Click `Advanced Effects` to open advanced settings window
79-
4. Expand a filter and check `enabled` to test effects
36+
<summary>
37+
More about USB serial
38+
</summary>
8039

81-
__Pitch Shifter__:
82-
* Slider controls pitch shift factor
40+
This option also requires configurations that are system independent.
8341

84-
__White Noise__:
85-
* Slider controls the noise strength
42+
On Windows, make sure the adb process is shutdown and android studio is closed.
8643

87-
__Repeat Track__:
88-
* Check `Repeat` to enable looped audio track
89-
* Slider controls audio track volume strength
90-
* `Select File` to select an audio file to play
91-
92-
__SpeexDSP Filters__:
93-
* Check corresponding filters to enable/disable
94-
* If Echo Cancellation does not work (your friend hears echo from your speaker)\
95-
Try re-enable echo cancellation to restart cancellation state\
96-
Echo Cancellation may take a while (5-10s) to optimize
97-
98-
__Rnnoise Filter__:
99-
* Check "Noise Cancellation" and try
44+
On MacOS, it should just work.
10045

46+
On Linux, you will need to configure [udev](https://github.com/libusb/libusb/wiki/FAQ#can-i-run-libusb-applications-on-linux-without-root-privilege) so that the app has permission to use USB.
10147
</details>
10248

103-
------
104-
105-
## Feature Plans
106-
107-
- [x] Windows app can minimize to system tray
108-
- [x] Volume control on Windows side
109-
- [x] Audio visualization on Windows side
110-
- [x] Show notification when mic is in use on Android side
111-
- [x] Audio effect filters
112-
- [x] Pitch Shifter
113-
- [x] Add White Noise
114-
- [x] Repeated Background Audio
115-
- [x] ~~SpeexDSP Noise Cancellation~~
116-
- [x] SpeexDSP Automatic Gain Control
117-
- [x] SpeexDSP Voice Activity Detection
118-
- [x] SpeexDSP Echo Cancellation
119-
- [x] Rnnoise Noise Cancellation
120-
- [x] Memorized user settings
121-
- [x] Select network adapter in Wifi/LAN mode
122-
- [ ] Port all Windows code & dependencies to .Net Core (with [Avalonia](https://github.com/AvaloniaUI/Avalonia))
123-
- [ ] MacOS Support
124-
- [ ] Linux Support
49+
For USB adb, make sure the system has installed [adb](https://developer.android.com/tools/adb). The connect your phone to PC.
12550

126-
------
51+
__Configure advanced settings__: Click to open the advanced settings window, and pick an audio format the output audio device supports. Usually sample rate of 44.1k or 48k, mono channel, and i16 or i24 are supported.
12752

128-
## Optimization Plans
53+
### Android Side
12954

130-
To further reduce latency, here're the possible areas to optimize:
131-
- [x] Use `Oboe` audio library
132-
- [x] Improve `NAudio` filters
133-
- [x] Use modern `NAudio` WASAPI player (no more Windows XP / lower support)
134-
- [x] Garbage Collection friendly buffers on Android Kotlin
135-
- [x] Garbage Collection friendly buffers on Windows C#
136-
- [ ] Threads / Coroutines priority level
137-
- [ ] Profile and analyze hot code paths on each
55+
__Start the app__: Similar to the PC side, the installer will be released in the future. For now, compile the app from Android studio and install on your phone.
13856

139-
------
57+
__Configure the app__: Open the side drawer menu, configure the connection method according to the option on PC app. Then pick the same audio format as the one in PC app advanced settings.
14058

141-
## Releases
59+
__Connect__: First start recording and give sufficient permissions. Recording permission for accessing your phone's mic. Notification permission so the app can let you know if it is still recording in the background. Then connect to the PC app.
14260

143-
Pre-built installers can be found [here](https://github.com/teamclouday/AndroidMic/releases)
144-
145-
------
146-
147-
## Windows Side
61+
<details>
62+
<summary>More about connection configurations</summary>
14863

149-
<p float="left">
150-
<img src="Assets/p1.png" width="510" alt="Windows Side">
151-
<img src="Assets/p4.png" width="250" alt="Windows Side">
152-
</p>
64+
For TCP/UDP, you will need to enter the PC address and port. You can find that information from the log area on PC app.
15365

154-
## Android Side
66+
For USB adb, set your phone to developer mode and enable USB debugging.
15567

156-
<img src="Assets/p2.png" width="250" alt="Android Side">
157-
<img src="Assets/p3.png" width="250" alt="Android Side">
68+
For USB serial, make sure your phone's USB setting is charging only.
69+
</details>
15870

159-
<img src="Assets/p5.png" width="500" alt="Android Side">
71+
--------
16072

73+
For more question / feature request / bug report, please submit issues to ask.

0 commit comments

Comments
 (0)