how to play .opus audio file in android?

Swati Vishnoi picture Swati Vishnoi · Jun 8, 2017 · Viewed 9.6k times · Source

I'm developing an app for Recognize speech using google cloud speech APi and recording audio simultaneously. git link I tried to play recorded .opus audio file getting IOException W/System.err: java.io.IOException: setDataSource failed.

Any idea?? Thanks!!

Answer

ThatGuyJames picture ThatGuyJames · Aug 12, 2017

A user on the android stack exchange mentioned being able to play opus files when they have a .ogg extension in newer versions of Android.

Rename your .opus files to .ogg.