Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

  • Audio capture manager presents the audio data to registered applications.
  • Supports creation of audio clips from currently streaming content. 
  • Creates clips of audio from content currently viewing so that it can be used for song identification service.
  • The Data Capture Service Manager API is used to create audio clip and post/stream to Music ID server (specified URL.)
  • When Service Manager API is called to create audio clip, settop creates audio clip of specified duration.

Data Flow

  • At startup, app calls org.rdk.dataCapture_1.enableAudioCapture api to create pre-capture audio buffer and starts buffering primary audio stream.
  • App makes request for audio clip capture by passing following parameters:
  • Destination URL and application parameters for Music ID service
  • Length of clip capture
  • Primary or secondary audio. (Note: Only primary audio is continuously captured)
  • Send pre-captured data, or post-capture (capture starts after app makes request). Majority of requests will be for pre-captured data, where entire clip is already captured by the time call is made.
  • App calls Service Manager API org.rdk.dataCapture_1.getAudioClip and passes the request
Code Block
{
"stream" : “primary”
"url" : "http://<musicid_server/analyze?trx=83cf6049-b722-4c44-b92e-79a504ae8f85:1458580048400&codec=PCM_16_16K&deviceId=5082732351093257712",
"duration" : 6
"captureMode" : “preCapture”
}

...

Note: the precaptured sample files have the following pattern: /opt/precap-*.wav.
The sound samples captured using capture next N seconds option will have the following filename pattern: /opt//opt/freshcap-*.wav.

API Documentation

To see the List of APIs supported by audiocapturemgr, Please see Audiocapturemgr API Documentation