Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaSE Documentation
PerformAudioPassThru

Class PerformAudioPassThru

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

This will open an audio pass thru session. By doing so the app can receive audio data through the vehicles microphone

Function Group: AudioPassThru

HMILevel needs to be FULL, LIMITED or BACKGROUND

Parameter List

Name Type Description Reg. Notes Version
initialPrompt TTSChunk[] SDL will speak this prompt before opening the audio pass thru session. N This is an array of text chunks of type TTSChunk. The array must have at least one item If omitted, then no initial prompt is spoken:

Array Minsize: 1

Array Maxsize: 100
SmartDeviceLink 2.0
audioPassThruDisplayText1 String First line of text displayed during audio capture. N Maxlength = 500 SmartDeviceLink 2.0
samplingRate SamplingRate This value shall is allowed to be 8 or 16 or 22 or 44 khz. Y SmartDeviceLink 2.0
maxDuration Integer The maximum duration of audio recording in milliseconds. Y Minvalue: 1; Maxvalue: 1000000 SmartDeviceLink 2.0
bitsPerSample BitsPerSample Specifies the quality the audio is recorded - 8 bit or 16 bit. Y SmartDeviceLink 2.0
audioType AudioType Specifies the type of audio data being requested. Y SmartDeviceLink 2.0
muteAudio Boolean N N SmartDeviceLink 2.0

Fields

KEY_MAX_DURATION

public static final java.lang.String KEY_MAX_DURATION
Constant Value
"maxDuration"

KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1

public static final java.lang.String KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1
Constant Value
"audioPassThruDisplayText1"

KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2

public static final java.lang.String KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2
Constant Value
"audioPassThruDisplayText2"

KEY_MUTE_AUDIO

public static final java.lang.String KEY_MUTE_AUDIO
Constant Value
"muteAudio"

KEY_SAMPLING_RATE

public static final java.lang.String KEY_SAMPLING_RATE
Constant Value
"samplingRate"

KEY_AUDIO_TYPE

public static final java.lang.String KEY_AUDIO_TYPE
Constant Value
"audioType"

KEY_INITIAL_PROMPT

public static final java.lang.String KEY_INITIAL_PROMPT
Constant Value
"initialPrompt"

KEY_BITS_PER_SAMPLE

public static final java.lang.String KEY_BITS_PER_SAMPLE
Constant Value
"bitsPerSample"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCRequest onResponseListener
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

PerformAudioPassThru()

Constructs a new PerformAudioPassThru object

public PerformAudioPassThru()

PerformAudioPassThru( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a new PerformAudioPassThru object indicated by the Hashtable parameter

public PerformAudioPassThru(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

PerformAudioPassThru( SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample, AudioType audioType )

Constructs a new PerformAudioPassThru object

public PerformAudioPassThru(SamplingRate samplingRate,Integer maxDuration,BitsPerSample bitsPerSample,AudioType audioType)

Constructor Parameters

samplingRate
a SamplingRate value representing a 8 or 16 or 22 or 24 khz
maxDuration
an Integer value representing the maximum duration of audio recording in millisecond Notes: Minvalue:1; Maxvalue:1000000
bitsPerSample
a BitsPerSample value representing 8 bit or 16 bit
audioType
an audioType

Methods

setInitialPrompt( java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt )

Sets initial prompt which will be spoken before opening the audio pass thru session by SDL

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setInitialPrompt(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> initialPrompt)

Method Parameters

initialPrompt
a List value represents the initial prompt which will be spoken before opening the audio pass thru session by SDL

Notes:
  • This is an array of text chunks of type TTSChunk
  • The array must have at least one item
  • If omitted, then no initial prompt is spoken
  • Array Minsize: 1
  • Array Maxsize: 100

getInitialPrompt()

Gets a List value representing an initial prompt which will be spoken before opening the audio pass thru session by SDL

public java.util.List getInitialPrompt()

setAudioPassThruDisplayText1( String audioPassThruDisplayText1 )

Sets a line of text displayed during audio capture

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setAudioPassThruDisplayText1(String audioPassThruDisplayText1)

Method Parameters

audioPassThruDisplayText1

a String value representing the line of text displayed during audio capture

Notes: Maxlength=500

getAudioPassThruDisplayText1()

Gets a first line of text displayed during audio capture

public java.lang.String getAudioPassThruDisplayText1()

setAudioPassThruDisplayText2( String audioPassThruDisplayText2 )

Sets a line of text displayed during audio capture

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setAudioPassThruDisplayText2(String audioPassThruDisplayText2)

Method Parameters

audioPassThruDisplayText2

a String value representing the line of text displayed during audio capture

Notes: Maxlength=500

getAudioPassThruDisplayText2()

Gets a second line of text displayed during audio capture

public java.lang.String getAudioPassThruDisplayText2()

setSamplingRate( SamplingRate samplingRate )

Sets a samplingRate

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setSamplingRate(SamplingRate samplingRate)

Method Parameters

samplingRate
a SamplingRate value representing a 8 or 16 or 22 or 24 khz

getSamplingRate()

Gets a samplingRate

public com.smartdevicelink.proxy.rpc.enums.SamplingRate getSamplingRate()

setMaxDuration( Integer maxDuration )

Sets the maximum duration of audio recording in milliseconds

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setMaxDuration(Integer maxDuration)

Method Parameters

maxDuration
an Integer value representing the maximum duration of audio recording in millisecond

Notes: Minvalue:1; Maxvalue:1000000

getMaxDuration()

Gets a max duration of audio recording in milliseconds

public java.lang.Integer getMaxDuration()

setBitsPerSample( BitsPerSample audioQuality )

Sets the quality the audio is recorded - 8 bit or 16 bit

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setBitsPerSample(BitsPerSample audioQuality)

Method Parameters

audioQuality
a BitsPerSample value representing 8 bit or 16 bit

getBitsPerSample()

Gets a BitsPerSample value, 8 bit or 16 bit

public com.smartdevicelink.proxy.rpc.enums.BitsPerSample getBitsPerSample()

setAudioType( AudioType audioType )

Sets an audioType

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setAudioType(AudioType audioType)

Method Parameters

audioType
an audioType

getAudioType()

Gets a type of audio data

public com.smartdevicelink.proxy.rpc.enums.AudioType getAudioType()

getMuteAudio()

Gets a Boolean value representing if the current audio source should be muted during the APT session

public java.lang.Boolean getMuteAudio()

setMuteAudio( Boolean muteAudio )

Sets a muteAudio value representing if the current audio source should be muted during the APT session If not, the audio source will play without interruption. If omitted, the value is set to true

public com.smartdevicelink.proxy.rpc.PerformAudioPassThru setMuteAudio(Boolean muteAudio)

Method Parameters

muteAudio
a Boolean value representing if the current audio source should be muted during the APT session

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCRequest getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener
com.smartdevicelink.proxy.RPCMessage getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section