6.1.7 PlayAudio

6.1.7.1 Outline of the node

This node plays the waveform data.

6.1.7.2 Necessary files

No files are required.

6.1.7.3 Usage

When to use

This node is used when wishing to listen to the separated speech waveform data or the recorded waveform data from microphones.

Typical connection

Figure 6.14 and Figure 6.15 show example usages of the PlayAudio node.

Figure 6.14 shows the example usage of listening to the separated speech waveform data. The separated speech waveform data can be calculated by the GHDSS node and the Synthesize node. When you use the stereo device, the waveform data for L channel should be input to INPUT1, and the waveform data for R channel should be input to INPUT2. When the waveform data is the multichannel data, the waveform data of all channel are mixed in each channel.

Figure 6.15 shows the example usage of listening to the recorded waveform data from microphones. The multichannel waveform data taken by AudioStreamFromWave should be input to INPUT_MULTI_CHANNEL. The assignment to the output channel is set using the MULTI_CHANNEL_ASSIGN parameter.

6.1.7.4 Input-output and property of the node

Table 6.16: Parameter list of PlayAudio
 Parameter name Type Default value Unit Description MASTER_VOLUME 0 [dB] Master volume of PlayAudio node. DEVICE The device index for playing. When this parameter is empty, PlayAudio uses the default device. CHANNNEL_COUNT 2 The number of channel for playing. The maximum value of this parameter is 2. MULTI_CHANNEL_ASSIGN See below. The assignment to the output channel. This parameter is used with INPUT_MULTI_CHANNEL. LATENCY 1000 [msec] The delay time for the stable playing. LENGTH 512 [pt] FFT length ADVANCE 160 [pt] Shift length SAMPLING_RATE 16000 [Hz] Sampling rate

Input

INPUT1

: Matrix<float> , Map<int, ObjectRef> or Vector<float> type. ObjectRef of Map<int, ObjectRef> is Vector<float> . The waveform data for the channel 1 of the sound device. When the waveform data is the multichannel data, the waveform data of all channel are mixed.

INPUT2

: Matrix<float> , Map<int, ObjectRef> or Vector<float> type. ObjectRef of Map<int, ObjectRef> is Vector<float> . The waveform data for the channel 2 of the sound device. When the waveform data is the multichannel data, the waveform data of all channel are mixed.

INPUT_MULTI_CHANNEL

: Matrix<float> or Map<int, ObjectRef> type. The assignment to the output channel is set using the MULTI_CHANNEL_ASSIGN parameter.

Output

OUTPUT

: Matrix<float> type. The waveform data for the output channels. This data is not affected by LATENCY parameter.

Parameter

MASTER_VOLUME

: float type. Master volume of PlayAudio node.

DEVICE

: int type. The device index for playing. When this parameter is empty, PlayAudio uses the default device.

CHANNNEL_COUNT

: int type. The number of channel for playing. The maximum value of this parameter is 2.

MULTI_CHANNEL_ASSIGN

: Vector<int> type. The assignment to the output channel. This parameter is used with INPUT_MULTI_CHANNEL. You should set the index or ID of the input data for the output channel. For example, when you wish to listen to the index 1 and 2 of the Matrix<float> , you should set this parameter <Vector<int> 1 2> . When the element of this parameter is larger than the size of Matrix<float> , PlayAudio plays the waveform data of the available channel, and PlayAudio shows the actual parameters. When this parameter is empty, PlayAudio plays the waveform data of the higher index with the number of the output channel.

LATENCY

: int type. The delay time for the stable playing.

LENGTH

: int type. FFT length; must be equal to the other node(AudioStreamFromMic , MultiFFT ).

: int type. Shift length; must be equal to the other node(AudioStreamFromMic , MultiFFT ).

SAMPLING_RATE

: int type. Sampling rate; must be equal to the other node(AudioStreamFromMic , MultiFFT ).

6.1.7.5 Details of the node

You should use either INPUT# or INPUT_MUITI_CHANNEL. When both INPUT# and INPUT_MUITI_CHANNEL are used, PlayAudio plays the mixed data.

Only one PlayAudio can be placed in the network file.

To change the assinment to the output channel:

When INPUT1 and INPUT2 is used, you should replace the connection. When INPUT_MUITI_CHANNEL is used, you should change the MULTI_CHANNEL_ASSIGN parameter.

To show the list of the output sound device:

The device list index can be shown by “Output Sound Device List”, which is provided by HARK. If you want to use Output Sound Device List, click [Start] $\rightarrow$ [Programs] $\rightarrow$ [HARK] $\rightarrow$ [Output Sound Device List]. Then, it lists up all the name of sound devices connected to your PC like Figure 6.16.