AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::acsdkAudioInputStream Namespace Reference


class  AudioInputStreamFactory
class  CompatibleAudioFormat


using AudioInputStreamComponent = acsdkManufactory::Component< std::shared_ptr< avsCommon::avs::AudioInputStream >, std::shared_ptr< avsCommon::utils::AudioFormat > >


AudioInputStreamComponent getComponent (const size_t wordSize=WORD_SIZE, const size_t maxReaders=MAX_READERS, const std::chrono::seconds amountOfAudioDataInBuffer=AMOUNT_OF_AUDIO_DATA_IN_BUFFER)
static std::function< std::shared_ptr< alexaClientSDK::avsCommon::avs::AudioInputStream > const std::shared_ptr< avsCommon::utils::AudioFormat > &)> getCreateAudioInputStream (const size_t wordSize, const size_t maxReaders, const std::chrono::seconds amountOfAudioDataInBuffer)
static const std::string TAG ("AudioInputStreamFactory")
 String to identify log entries originating from this file. More...


static const size_t WORD_SIZE = 2
 Default params for AudioInputStreamComponent. More...
static const size_t MAX_READERS = 10
static const std::chrono::seconds AMOUNT_OF_AUDIO_DATA_IN_BUFFER = std::chrono::seconds(15)
static const unsigned int SAMPLE_RATE_HZ = 16000
 The sample rate of microphone audio data. More...
static const unsigned int NUM_CHANNELS = 1
 The number of audio channels. More...
static const size_t WORD_SIZE = 2
 The size of each word within the stream. More...

Typedef Documentation

◆ AudioInputStreamComponent

using alexaClientSDK::acsdkAudioInputStream::AudioInputStreamComponent = typedef acsdkManufactory:: Component<std::shared_ptr<avsCommon::avs::AudioInputStream>, std::shared_ptr<avsCommon::utils::AudioFormat> >

Definition of a Manufactory Component for the default AudioInputStream.

Function Documentation

◆ getComponent()

AudioInputStreamComponent alexaClientSDK::acsdkAudioInputStream::getComponent ( const size_t  wordSize = WORD_SIZE,
const size_t  maxReaders = MAX_READERS,
const std::chrono::seconds  amountOfAudioDataInBuffer = AMOUNT_OF_AUDIO_DATA_IN_BUFFER 

Creates an manufactory component that exports AudioInputStream.

wordSizeThe size of each word within the stream.
maxReadersThe maximum number of readers of the stream.
amountOfAudioDataInBufferThe amount of audio data to keep in the ring buffer.
A component.

◆ getCreateAudioInputStream()

static std::function<std::shared_ptr<alexaClientSDK::avsCommon::avs::AudioInputStream> const std::shared_ptr<avsCommon::utils::AudioFormat>&)> alexaClientSDK::acsdkAudioInputStream::getCreateAudioInputStream ( const size_t  wordSize,
const size_t  maxReaders,
const std::chrono::seconds  amountOfAudioDataInBuffer 

◆ TAG()

static const std::string alexaClientSDK::acsdkAudioInputStream::TAG ( "AudioInputStreamFactory"  )

String to identify log entries originating from this file.

Variable Documentation


const std::chrono::seconds alexaClientSDK::acsdkAudioInputStream::AMOUNT_OF_AUDIO_DATA_IN_BUFFER = std::chrono::seconds(15)


const size_t alexaClientSDK::acsdkAudioInputStream::MAX_READERS = 10


const unsigned int alexaClientSDK::acsdkAudioInputStream::NUM_CHANNELS = 1

The number of audio channels.


const unsigned int alexaClientSDK::acsdkAudioInputStream::SAMPLE_RATE_HZ = 16000

The sample rate of microphone audio data.

◆ WORD_SIZE [1/2]

const size_t alexaClientSDK::acsdkAudioInputStream::WORD_SIZE = 2

The size of each word within the stream.

◆ WORD_SIZE [2/2]

const size_t alexaClientSDK::acsdkAudioInputStream::WORD_SIZE = 2

Default params for AudioInputStreamComponent.

AlexaClientSDK 1.26.0 - Copyright 2016-2021, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0