6.9.1 EstimateTF

6.9.1.1 Outline of the node

This node creates the estimated transfer function file using the input signal.

This transfer function is calculated by the following steps.

  1. record the input signal from the sound source which generates noise such as white noise.

  2. calculate relative transfer function between the microphones for the source position.

Here, localization of the source is estimated by the node for localization such as LocalizeMUSIC . These steps should be execute for the every direction around the microphone array.

6.9.1.2 Necessary file

The transfer function file which is used for the base, or the intermediate file group which is consists of microphone position files, source position file, transfer function files for each direction and the intermediate file.

6.9.1.3 Usage

When to use

This node creates the estimated transfer function files using the input signal. The estimated transfer function will be used for the localization node and sound source separation node, such as LocalizeMUSIC and GHDSS .

Typical connection

Figure 6.162 shows a typical connection example.

\includegraphics[width=0.85\linewidth ]{fig/modules/EstimateTF-connection}
Figure 6.162: Connection example of EstimateTF 

Figure 6.163 shows a typical connection example for the online processing of transfer function. PyCodeExcecutor3 placed in front of EstimateTF receives the localization processing result and outputs the sources and the count number. EstimateTF updates the transfer function using the source and the spectrum data corresponding to target count, and outputs it to the subsequent stage. LocalizeMUSIC updates the transfer function in the node with the transfer function data output from EstimateTF and executes localization. The result of localization is transmitted using PyCodeExcecutor3 via SourceTracker , and received by PyCodeExcecutor3 in the previous stage of EstimateTF . This allows LocalizeMUSIC to always use the latest transfer function data to execute localization.

\includegraphics[width=0.85\linewidth ]{fig/modules/EstimateTF-connection2}
Figure 6.163: Connection example of EstimateTF (Online)

6.9.1.4 Input-output and property of the node

Input

INPUT

: Matrix<complex<float> > , Complex frequency representation of input signals with size $M \times (NFFT/2+1)$.

SOURCE

: Source position (direction) is expressed as Vector<ObjectRef>  type. ObjectRef  is a Source  and is a structure which is consists of the source position.

INPUT_INPROGRESS

: bool , shows the flag for the progressing. When this input becomes false, this node creates the transfer function file.

SEND_DATA

: bool , Flag for data transfer. If 1/true, transfers transfer function data.

RESET

: bool , Flag for data reset. If 1/true, resets and transfers all transfer function data.

SEND_ALL

: bool , Flag for data transfer all. If 1/true, transfers all transfer function data.

TARGET_COUNT

: int , Target count for estimation the transfer function. This input terminal is not displayed by default.

Refer to Figure 6.164 for the addition method of hidden input.

\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_input1}
Step 1: Right-click EstimateTF  and click Add Input.
\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_input2}
Step 2: Enter TARGET_COUNT in the input, then, click Add.
\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_input3}
Step 3: The TARGET_COUNT input terminal is added to the node.
Figure 6.164: Usage example of hidden inputs : Display of TARGET_COUNT terminal

Output

OUTPUT_INPROGRESS

: bool , shows the flag for the progressing. The output value is same as INPUT_INPROGRESS.

TRANSFER_FUNCTION

: TransferFunction , Transfer function data stream. This output terminal is not displayed by default.

Refer to Figure 6.165 for the addition method of hidden output.

\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_output1}
Step 1: Right-click EstimateTF  and click Add Output.
\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_output2}
Step 2: Enter TRANFER_FUNCTION in the input, then, click Add.
\includegraphics[width=\linewidth ]{fig/modules/EstimateTF_output3}
Step 3: The TRANFER_FUNCTION output terminal is added to the node.
Figure 6.165: Usage example of hidden outputs : Display of TRANFER_FUNCTION terminal

Parameter

Table 6.153: Parameter list of CSP 

Parameter name

Type

Default value

Unit

description

EST_TF_FILENAME

string 

   

Estimated transfer function file name

LENGTH

int 

512

[pt]

FFT points ($NFFT$)

SAMPLING_RATE

int 

16000

[Hz]

Sampling rate

INPUT_TYPE

string 

TF

 

Input type for the base transfer function

BASE_TF_FILENAME

string 

   

Transfer function file name for the base

IMPORT_INTERMEDIATE_DATA

string 

   

Directory name of the intermediate file group for the base

EXPORT_INTERMEDIATE_DATA

string 

   

Directory name of the intermediate file group for export

EXPORT_HISTORY_FILE

bool 

false

 

ON/OFF for history file output

HISTORY_FILE_FRAMES

int 

10000

 

Number of frames for exporting the history file

HISTORY_FILE_ PERIOD

int 

1

 

Period for exporting the history file

INITIAL_TF_OUTPUT

string 

ALL

 

Whether to output all data at the first

LOOK_BACK_COUNT

int 

10

 

The number of frames for look-back

DEBUG

bool 

false

 

ON/OFF of debug output

EST_TF_FILENAME

: string type. There is no default value. The file name of the estimated transfer function file is designated. When INPUT_INPROGRESS becomes false, this node creates the estimated transfer function file.

LENGTH

: int  type. 512 is the default value. FFT point in the case of fourier transform. It is necessary to align it with the FFT points to the preceding paragraph.

SAMPLING_RATE

: int  type. 16000 is the default value. Sampling frequency of input acoustic signal. It is necessary to align with other nodes like LENGTH.

INPUT_TYPE

: string type. TF is the default value. The input type for the base transfer function is designated by TF or INTERMEDIATE. In the case of TF, BASE_TF_FILENAME should be designated for execution. In the case of INTERMEDIATE, IMPORT_INTERMEDIATE_DATA should be designated, and microphones.xml and source.xml should be existed there.

BASE_TF_FILENAME

: string type. There is no default value. The file name of the base transfer function file is designated. This parameter is shown when $INPUT\_ TYPE=TF$.

IMPORT_INTERMEDIATE_DATA

: string type. There is no default value. The directory name of the intermediate file group for base is designated. microphones.xml and source.xml should be existed in this directory. This parameter is shown when $INPUT\_ TYPE=INTERMEDIATE$.

EXPORT_INTERMEDIATE_DATA

: string type. There is no default value. The directory name of the intermediate file group for export is designated. When $EXPORT\_ HISTORY\_ FILE=true$, this parameter should be designated.

EXPORT_HISTORY_FILE

: bool type. falseis the default value. ON/OFF of the history file output. When $EXPORT\_ HISTORY\_ FILE=true$, this node outputs the history file to EXPORT_INTERMEDIATE_DATA.

HISTORY_FILE_FRAMES

: bool type. 10000 is the default value. Number of the frames for exporting history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.

HISTORY_FILE_PERIOD

: int type. 1 is default value. The cycle for output the history. This parameter is shown when $EXPORT\_ HISTORY\_ FILE=true$.

INITIAL_TF_OUTPUT

: string type. Whether to output all data at the first. "ALL" outputs all data, and "PARTIAL" outputs only update date. The default value is ALL.

LOOK_BACK_COUNT

: int type. The number of frames for look-back. The default value is 10.

DEBUG

: bool  type. ON/OFF of the debug output and the format of the debug output are as follows. First, the updated source position is outputted. Then, the updated transfer function is shown.

6.9.1.5 Details of the node

Estimation of the transfer function :

The transfer function is estimated by averaging amplitude and phase of the input signal for each direction which is estimated by sound source localization.

The transfer function is estimated by following steps.

  1. normalize the base transfer function

  2. normalize the input spectrum

  3. update the transfer function with normalized input spectrum by linear averaging

Normalization is calculated as $norm of amplitude=1$ and $average of phase=0deg$.

Intermediate file group :

Intermediate file group is consists of following file.

When the base transfer function is input by the intermediate file group, source.xml and microphones.xml should be existed.

About the intermediate file :

The intermediate file is used for additional update for the transfer function.

The file format of this file is the Matrix binary format, which type is float. The row data of the matrix means the information for each source position.

About the history file :

The history file is used for the analysis of estimating the trunsfer function. This files shows the alteration of the averaged value and the varianced value of the transfer function according to update. The cycle of writing the history is designated by HISTORY_FILE_PERIOD. When the written size of history data is over the HISTORY_FILE_FRAMES, the oldedst history data is overwritten by the new history data.

The file format of this file is the Matrix binary format, which type is float. The row data of the matrix means the information for each history data.