NUGU SDK Linux  1.7.6
nugu_audio.h File Reference
#include <nugu.h>
+ Include dependency graph for nugu_audio.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nugu_audio_property
 audio property More...
 

Macros

#define NUGU_AUDIO_ATTRIBUTE_ALARM_DEFAULT_STRING   "ALARM"
 
#define NUGU_AUDIO_ATTRIBUTE_CALL_DEFAULT_STRING   "CALL"
 
#define NUGU_AUDIO_ATTRIBUTE_MUSIC_DEFAULT_STRING   "MUSIC"
 
#define NUGU_AUDIO_ATTRIBUTE_NAVIGATION_DEFAULT_STRING   "NAVIGATION"
 
#define NUGU_AUDIO_ATTRIBUTE_NOTIFICATION_DEFAULT_STRING   "NOTIFICATION"
 
#define NUGU_AUDIO_ATTRIBUTE_RINGTONE_DEFAULT_STRING   "RINGTONE"
 
#define NUGU_AUDIO_ATTRIBUTE_SYSTEM_SOUND_DEFAULT_STRING   "SYSTEM_SOUND"
 
#define NUGU_AUDIO_ATTRIBUTE_VOICE_COMMAND_DEFAULT_STRING   "VOICE_COMMAND"
 

Typedefs

typedef enum nugu_audio_attribute NuguAudioAttribute
 NuguAudioAttribute.
 
typedef struct nugu_audio_property NuguAudioProperty
 NuguAudioProperty.
 

Enumerations

enum  nugu_audio_attribute {
  NUGU_AUDIO_ATTRIBUTE_MUSIC = 1 , NUGU_AUDIO_ATTRIBUTE_RINGTONE , NUGU_AUDIO_ATTRIBUTE_CALL , NUGU_AUDIO_ATTRIBUTE_NOTIFICATION ,
  NUGU_AUDIO_ATTRIBUTE_ALARM , NUGU_AUDIO_ATTRIBUTE_VOICE_COMMAND , NUGU_AUDIO_ATTRIBUTE_NAVIGATION , NUGU_AUDIO_ATTRIBUTE_SYSTEM_SOUND
}
 audio attribute More...
 
enum  nugu_audio_format {
  NUGU_AUDIO_FORMAT_S8 , NUGU_AUDIO_FORMAT_U8 , NUGU_AUDIO_FORMAT_S16_LE , NUGU_AUDIO_FORMAT_S16_BE ,
  NUGU_AUDIO_FORMAT_U16_LE , NUGU_AUDIO_FORMAT_U16_BE , NUGU_AUDIO_FORMAT_S24_LE , NUGU_AUDIO_FORMAT_S24_BE ,
  NUGU_AUDIO_FORMAT_U24_LE , NUGU_AUDIO_FORMAT_U24_BE , NUGU_AUDIO_FORMAT_S32_LE , NUGU_AUDIO_FORMAT_S32_BE ,
  NUGU_AUDIO_FORMAT_U32_LE , NUGU_AUDIO_FORMAT_U32_BE , NUGU_AUDIO_FORMAT_MAX
}
 audio format More...
 
enum  nugu_audio_sample_rate {
  NUGU_AUDIO_SAMPLE_RATE_8K , NUGU_AUDIO_SAMPLE_RATE_16K , NUGU_AUDIO_SAMPLE_RATE_32K , NUGU_AUDIO_SAMPLE_RATE_22K ,
  NUGU_AUDIO_SAMPLE_RATE_44K , NUGU_AUDIO_SAMPLE_RATE_MAX
}
 audio sample rate More...
 

Functions

NUGU_API NuguAudioAttribute nugu_audio_get_attribute (const char *str)
 Get audio attribute type from string. More...
 
NUGU_API const char * nugu_audio_get_attribute_str (const NuguAudioAttribute attribute)
 Get audio attribute string. More...
 
NUGU_API void nugu_audio_set_attribute_str (const NuguAudioAttribute attribute, const char *str)
 Set audio attribute string. More...
 

Enumeration Type Documentation

◆ nugu_audio_sample_rate

audio sample rate

Enumerator
NUGU_AUDIO_SAMPLE_RATE_8K 

8K

NUGU_AUDIO_SAMPLE_RATE_16K 

16K

NUGU_AUDIO_SAMPLE_RATE_32K 

32K

NUGU_AUDIO_SAMPLE_RATE_22K 

22K

NUGU_AUDIO_SAMPLE_RATE_44K 

44K

◆ nugu_audio_format

audio format

Enumerator
NUGU_AUDIO_FORMAT_S8 

Signed 8 bits

NUGU_AUDIO_FORMAT_U8 

Unsigned 8 bits

NUGU_AUDIO_FORMAT_S16_LE 

Signed 16 bits little endian

NUGU_AUDIO_FORMAT_S16_BE 

Signed 16 bits big endian

NUGU_AUDIO_FORMAT_U16_LE 

Unsigned 16 bits little endian

NUGU_AUDIO_FORMAT_U16_BE 

Unsigned 16 bits big endian

NUGU_AUDIO_FORMAT_S24_LE 

Signed 24 bits little endian

NUGU_AUDIO_FORMAT_S24_BE 

Signed 24 bits big endian

NUGU_AUDIO_FORMAT_U24_LE 

Unsigned 24 bits little endian

NUGU_AUDIO_FORMAT_U24_BE 

Unsigned 24 bits big endian

NUGU_AUDIO_FORMAT_S32_LE 

Signed 32 bits little endian

NUGU_AUDIO_FORMAT_S32_BE 

Signed 32 bits big endian

NUGU_AUDIO_FORMAT_U32_LE 

Unsigned 32 bits little endian

NUGU_AUDIO_FORMAT_U32_BE 

Unsigned 32 bits big endian

◆ nugu_audio_attribute

audio attribute

Enumerator
NUGU_AUDIO_ATTRIBUTE_MUSIC 

audio attribute for music

NUGU_AUDIO_ATTRIBUTE_RINGTONE 

audio attribute for ringtone

NUGU_AUDIO_ATTRIBUTE_CALL 

audio attribute for call

NUGU_AUDIO_ATTRIBUTE_NOTIFICATION 

audio attribute for notification

NUGU_AUDIO_ATTRIBUTE_ALARM 

audio attribute for alarm

NUGU_AUDIO_ATTRIBUTE_VOICE_COMMAND 

audio attribute for voice command like tts

NUGU_AUDIO_ATTRIBUTE_NAVIGATION 

audio attribute for navigation

NUGU_AUDIO_ATTRIBUTE_SYSTEM_SOUND 

audio attribute for system sound

Function Documentation

◆ nugu_audio_set_attribute_str()

NUGU_API void nugu_audio_set_attribute_str ( const NuguAudioAttribute  attribute,
const char *  str 
)

Set audio attribute string.

Parameters
[in]attributeaudio attribute
[in]straudio attribute's string

◆ nugu_audio_get_attribute_str()

NUGU_API const char* nugu_audio_get_attribute_str ( const NuguAudioAttribute  attribute)

Get audio attribute string.

Parameters
[in]attributeaudio attribute
Returns
audio attribute string

◆ nugu_audio_get_attribute()

NUGU_API NuguAudioAttribute nugu_audio_get_attribute ( const char *  str)

Get audio attribute type from string.

Parameters
[in]straudio attribute's string
Returns
audio attribute