Posts: 2
Threads: 1
Joined: Mar 2020
I would like to measure the distance between a bluetooth speaker and the phone's microphone by measuring the time it takes sound to travel from the speaker to the microphone. The acoustic ruler is already very close to this. It just needs to have a button that starts the timer and triggers the bluetooth speaker to play a sound, and then stop the timer when the microphone detects the sound.
Has anyone done anything like this before?
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
I am afraid, that you will need two microphones for this. To my knowledge there is no simple way to synchronize the speaker and the microphone (except for listening for the sound, which defeats the purpose). In the app, we can instruct the system to play a sound and to start a recording. However, there is no guarantee for the exact delay between issuing the instruction and the actual start of the playback/recording and I do not know of any method to tell the system that both should start simultaneously. In most use cases, this does not matter as long as the delay is not noticable by the user but for your experiment it needs to be precise.
Posts: 2
Threads: 1
Joined: Mar 2020
(03-03-2020, 01:50 PM)Sebastian Staacks Wrote: I am afraid, that you will need two microphones for this. To my knowledge there is no simple way to synchronize the speaker and the microphone (except for listening for the sound, which defeats the purpose). In the app, we can instruct the system to play a sound and to start a recording. However, there is no guarantee for the exact delay between issuing the instruction and the actual start of the playback/recording and I do not know of any method to tell the system that both should start simultaneously. In most use cases, this does not matter as long as the delay is not noticable by the user but for your experiment it needs to be precise.
I wonder if it could be done by adding a calibration step? Basically set the speaker at a series of known distances (3m, 2m, 1m, etc...) to come up with a graph showing relationship between time and distance. Then the y-intercept would be the amount of time to account for the delay between the instruction and the start of playback/recording?
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
True, if it is a fixed delay. I am not sure if this is correct for every device. For example, the actual hardware could already be recording (for example to catch trigger words for voice commands - not sure if it is done that way) and a new recording would start on the next buffer turn-over. In this case, the delay would be a random value between zero (or some minimum) and the buffer length.
In any case, phyphox cannot do this at the moment and due to the structure of phyphox, this will not make it into the app for quite a while. On the other hand, phyphox also does not support multiple microphones (not sure if there is any support for this on smartphones at all, but stereo channels might work here). So, I think your best bet would be using two microphones that are physically attached to the microphone input, so you can see the recording of both in a single graph and can read the delay between two peaks.