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

Classes

class  AudioInputStreamFactory
 
class  CompatibleAudioFormat
 

Typedefs

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

Functions

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...
 

Variables

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.

Parameters
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.
Returns
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 
)
static

◆ TAG()

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

String to identify log entries originating from this file.

Variable Documentation

◆ AMOUNT_OF_AUDIO_DATA_IN_BUFFER

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

◆ MAX_READERS

const size_t alexaClientSDK::acsdkAudioInputStream::MAX_READERS = 10
static

◆ NUM_CHANNELS

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

The number of audio channels.

◆ SAMPLE_RATE_HZ

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

The sample rate of microphone audio data.

◆ WORD_SIZE [1/2]

const size_t alexaClientSDK::acsdkAudioInputStream::WORD_SIZE = 2
static

The size of each word within the stream.

◆ WORD_SIZE [2/2]

const size_t alexaClientSDK::acsdkAudioInputStream::WORD_SIZE = 2
static

Default params for AudioInputStreamComponent.

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