NET
For ACRCloud.NET to understand your audio file as it streams, it must have a sample rate of the audio equal to the sample rate of the file. ACRCloud.NET is automatically configured to do so, but if your file has a different sample rate then you must set the audioSampleRate property of the ACRCloud.RecordAudioImage object in the RecordAudioImage constructor.
Related:
Using Audio Thumbnails with ACRCloud.NET
The RecordAudioImage() method and the PlayAudioImage() method both use sample-by-sample images to draw a frame of audio. In contrast, the RecordAudioImage() method can record both audio and video, and provides thumbnail images of audio to help you navigate the audio. The PlayAudioImage() method can play back audio, but it has no support for recording video.
To enable thumbnail images in your recorded audio, set the ThumbnailEnabled property of the ACRCloud.RecordAudioImage object to true. Then when you call the RecordAudioImage() method with the ThumbnailEnabled property set to true, ACRCloud.NET will record thumbnail images for the audio it records and place them in the ThumbnailImageDirectory. You can also control whether ACRCloud.NET will record audio thumbnail images by setting the ThumbnailRate property of the ACRCloud.RecordAudioImage object to a value greater than 0. When the ThumbnailRate property is set to 0, thumbnail images are not recorded.
You can set the ThumbnailEnabled property in the RecordAudioImage() method to false when you are calling the method from within a PlayAudioImage() method.
Playing Thumbnail Images with ACRCloud.NET
The ThumbnailImageDirectory property of the ACRCloud.RecordAudioImage object provides the path where thumbnail images are saved. The ThumbnailImageDirectory property can be set to a value of the following predefined string constants in your program:
Default: "thumbnails"
Directory: "thumbnails/"
You can access the ThumbnailImageDirectory property from the ACRCloud.RecordAudioImage object in your program using the following code:
Setting the ThumbnailEnabled Property
In order to use the ACRCloud.RecordAudioImage() method with the ThumbnailEnabled property set to true, the property must be set before you call the method, so that ACRCloud.NET knows where to record thumbnail images
Related links:
Comments