DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Development of Custom Web Applications Within SAP Business Technology Platform
  • Coding Once, Thriving Everywhere: A Deep Dive Into .NET MAUI’s Cross-Platform Magic
  • The Ultimate Guide To Building Front-End Web Applications From Scratch
  • Weighing the Trade-Offs of Native vs. Cross-Platform Mobile App Development

Trending

  • Agile Metrics and KPIs in Action
  • Send Your Logs to Loki
  • Effective Tips for Debugging Complex Code in Java
  • How To Verify Database Connection From a Spring Boot Application

3 Tips for Ensuring Flawless Streaming Audio Applications

Digital content delivery has changed the face of the music industry. Learn how successful brands ensure seamless audio streaming in their apps.

Amir Rozenberg user avatar by
Amir Rozenberg
·
Aug. 18, 17 · Tutorial
Like (5)
Save
Tweet
Share
4.03K Views

Join the DZone community and get the full member experience.

Join For Free

The music industry has been going through a tremendous transformation for some time now, aiming to

  • Discover new ways to drive adoption and usage.

  • Explore new revenue streams and innovation.

The introduction of digital content delivery (MP3, iTunes, etc.) was the first immensely disruptive wave,  followed by live music streaming.  After over a decade of gloomy outlook, things are starting to look promising, thanks to the rise in digital music services.

Image title

Source.

Interestingly, many music-related vendors are finding new innovative paths to success: Shazam, one of the well-known brands in this space, is now capable of not only recognizing a song, the app can recognize an image, and there’s even a TV show. 

Users are reacting favorably to new services and devices: According to Nielsen, on-demand audio streams grew by 76% in 2016. Interestingly, while digital sales are dominant, users are preferring streaming experiences. Streaming experiences enable users to enriched discovery experiences and flexibility.

Image title

Nowadays, with offline access and proliferation of unlimited cellular plans, streaming records are breaking: in 2016, over 27 songs passed 200 million on-demand streams. Spotify is another example, readying to go public with 60 million subscribers.

With such tremendous potential in the music business come challenges. Much like other industries (finance, healthcare, and retail), users’ expectation for a flawless experience is high. In addition, users are extremely impacted by the quality of the song being played. That is the case for paid services as well as free ones.

For music vendors, there are many challenges: competing in a challenging and busy market, achieving revenue and user goals, and driving innovation and quality to end users. For testers of mobile music applications, this represents yet another quality requirement in a shrinking agile cycle. As always- the answer to this challenge comes through automation.

Through the introduction of the audio-testing capable lab, it is possible to introduce test automation to audio applications such as Spotify, Pandora, Shazam, and Audible. The ecosystem is extensible such that integration with song recognition engines, for example, is possible as well.

In the demo below (open source code available here), the following is shown:

  • Launching the iHeart Radio app and recording a snippet of a song:

    // http://developers.perfectomobile.com/pages/viewpage.action?pageId=14878149
    public static String startAudioRecording(RemoteWebDriver driver) {
        Map<String, Object> params = new HashMap<>();

        String audioFileURL = (String) driver.executeScript("mobile:audio.recording:start", params);
        return audioFileURL;
    }

    // http://developers.perfectomobile.com/pages/viewpage.action?pageId=14878153
    public static void stopAudioRecording(RemoteWebDriver driver) {
        Map<String, Object> params = new HashMap<>();
        driver.executeScript("mobile:audio.recording:stop", params);
    }
  • Recognize the song (using the snippet) using an integration with a song recognition algorithm (ACRCloud). Compare the song name and artist to the meta data shown on the app.

      
public static String detectSong(String url){
// Reads the audio file into memory
String resultString = null;
try {
Path filePath = download(url);  

ACRCloudRecognizer acr = new ACRCloudRecognizer();
resultString = acr.recognizeByFile(filePath.toString(), 0);
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return resultString;
}


  • Recognize the song (again) using the Shazam App, and compare again.

    // http://developers.perfectomobile.com/pages/viewpage.action?pageId=13893806
    public static void injectAudio(RemoteWebDriver driver, String repositoryKey) {
        Map<String, Object> params = new HashMap<>();
        params.put("key", repositoryKey);
        driver.executeScript("mobile:audio:inject", params);
    }

Going through this exercise was fun. If you’re developing an audio app, we recommend you check out the documentation on audio functions, specifically about the audio quality validation capabilities. Here are a few points for you to consider:

  • Ensure the basic functionality of the app works via standard test automation. Run those scripts nightly or even as part of the smoke test every commit.
  • Include audio test automation in your nightly test. Ensure that the stream is comprehensible (audible text or recognizable music) via appropriate engines.
  • Last, add audio quality measurement to your testing. Repeat both in ideal conditions as well as in sub-optimal network and device load conditions.

Music streaming and audio services are gaining popularity these days. Testing of those services is a task that best managed via objective, automated process. This approach enables the development team to focus on innovation while ensuring on-time delivery of a high-quality app to the market. Seems like Spotify is getting it right:

Image title

Spotify's app rating in the App Store.

mobile app

Opinions expressed by DZone contributors are their own.

Related

  • Development of Custom Web Applications Within SAP Business Technology Platform
  • Coding Once, Thriving Everywhere: A Deep Dive Into .NET MAUI’s Cross-Platform Magic
  • The Ultimate Guide To Building Front-End Web Applications From Scratch
  • Weighing the Trade-Offs of Native vs. Cross-Platform Mobile App Development

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: