AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Functions
alexaClientSDK::diagnostics::utils Namespace Reference

Functions

bool validateAudioFormat (const avsCommon::utils::WavHeader &wavHeader)
 
bool readWavFileToBuffer (const std::string &absoluteFilePath, std::vector< uint16_t > *audioBuffer)
 

Function Documentation

◆ readWavFileToBuffer()

bool alexaClientSDK::diagnostics::utils::readWavFileToBuffer ( const std::string &  absoluteFilePath,
std::vector< uint16_t > *  audioBuffer 
)

Reads the wav file into the audio buffer vector.

Note: Following should be the specifications of the wav file : Sample Size: 16 bits Sample Rate: 16 KHz Number of Channels : 1 Endianness : Little Encoding Format : LPCM

Parameters
absoluteFilePathThe absolute path of the wav file.
[out]audioBufferThe pointer to the audioBuffer vector.
Returns
true if successful, else false.

◆ validateAudioFormat()

bool alexaClientSDK::diagnostics::utils::validateAudioFormat ( const avsCommon::utils::WavHeader wavHeader)

Validates the audio format.

Note: Following should be the specifications of the wav file : Sample Size: 16 bits Sample Rate: 16 KHz Number of Channels : 1 Endianness : Little Encoding Format : LPCM

Parameters
wavFileHeaderThe header of a wav file.
Returns
true if successful, else false.

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0