How to perform audio validation (speech to text) using appium

1,086 views
Skip to first unread message

vicrojas

unread,
Jun 27, 2016, 10:40:30 AM6/27/16
to appium-developers

Hello guys,


Hope you can help me with this one. I'm automating an application (physical device) for unified meetings.
(automation done through android, lollypop, physical device).

To keep it short the application allows the user to log into a meeting through a series of navigation steps in the application (no problem automating that part) and in the end receives a welcome audio and the meeting starts.

My problem is that I've been trying to catch the audio to perform an speech to text validation and verify that the contents of the welcome message is the one that should be playing or the quality satisfies what we are expecting,

but I haven't found a way to catch the audio using appium, so far I've tried two alternatives but none of them seems to be optimal:



First approach:
I tried catching the audio using AirPlay software installed in the phone and in the pc to catch the audio comming from the phone but it has many drawbacks (it works by wifi, introducing delay times that affect the tests, some times the audio is not transferred entirely, not to mention that both devices - phone and pc - have to be in the same wifi network).



Second approach:
This was a little "dirt" approach and consisted in using a cable to catch the audio output from the phone and transferred it to the input line of the pc, this approach is a little more direct but also has its disadvantages, not all the audio is transferred and too much noise is injected in the audio captured.

Do you think that is possible to capture the audio produced in the phone and transfer it to the pc to perform the audio checks? any alternatives that you may suggest?.



Thanks a lot for your help.
Victor

Jonah Stiennon

unread,
Jun 27, 2016, 4:43:07 PM6/27/16
to appium-d...@googlegroups.com
I haven't heard of anybody being successful with audio validation. All the ideas we've had are the same as yours. I'm glad that you've tried those approaches, we can use that info to advise others following the same path.

That's just me, perhaps another dev has an idea of how to properly grab the audio?

It's at least worth filing a feature request with Apple, they said they would like to implement more for testing.

~ Jonahss

--
You received this message because you are subscribed to the Google Groups "appium-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-develop...@googlegroups.com.
Visit this group at https://groups.google.com/group/appium-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/appium-developers/155ca02f-3c54-4c37-a141-7bdc87256bfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Cuellar

unread,
Jun 28, 2016, 5:00:03 AM6/28/16
to appium-developers
The problem you are experiencing is that the headphone jack on the phone outputs sound at line level and the input on the machine receives sound at microphone level. You need to attenuate the signal in order for it to be clear on the computer without clipping and distortion. When I worked at Shazam we had this setup and it worked quite well. The best option is just to connect the headphone jack on the phone to an audio interface via USB to the computer. Should be solvable for $15-30 of hardware.

When I worked at Shazam we had the opposite flow as well. We had tests that would play music files on the machine and feed them into the phone. We used an iRig ($10) to send the audio to the phone and we used a line-level input on the computer to receive the audio from the phone.

vicrojas

unread,
Jun 30, 2016, 4:47:54 PM6/30/16
to appium-developers
Guys, thanks for your comments, they gave me a better picture of what's happening, will explore Dan's path.

Venkatesh Singh

unread,
Feb 13, 2018, 4:06:29 AM2/13/18
to appium-developers
Hi,

Were you able to find any solution ?

Regards,
Venkatesh

beenyouqa

unread,
Feb 13, 2018, 11:41:45 AM2/13/18
to appium-developers
Can you please share your experience with the above approach.
Reply all
Reply to author
Forward
0 new messages