Apollo 10.0
自动驾驶开放平台
apollo::audio::MessageProcess类 参考

#include <message_process.h>

apollo::audio::MessageProcess 的协作图:

Public 成员函数

 MessageProcess ()=delete
 

静态 Public 成员函数

static void OnMicrophone (const apollo::drivers::microphone::config::AudioData &audio_data, const std::string &respeaker_extrinsics_file, AudioInfo *audio_info, DirectionDetection *direction_detection, MovingDetection *moving_detection, SirenDetection *siren_detection, AudioDetection *audio_detection)
 

详细描述

在文件 message_process.h31 行定义.

构造及析构函数说明

◆ MessageProcess()

apollo::audio::MessageProcess::MessageProcess ( )
delete

成员函数说明

◆ OnMicrophone()

void apollo::audio::MessageProcess::OnMicrophone ( const apollo::drivers::microphone::config::AudioData audio_data,
const std::string &  respeaker_extrinsics_file,
AudioInfo audio_info,
DirectionDetection direction_detection,
MovingDetection moving_detection,
SirenDetection siren_detection,
AudioDetection audio_detection 
)
static

在文件 message_process.cc24 行定义.

31 {
32 audio_info->Insert(audio_data);
33 auto direction_result =
34 direction_detection->EstimateSoundSource(
35 audio_info->GetSignals(audio_data.microphone_config().chunk()),
36 respeaker_extrinsics_file,
37 audio_data.microphone_config().sample_rate(),
38 audio_data.microphone_config().mic_distance());
39 *(audio_detection->mutable_position()) = direction_result.first;
40 audio_detection->set_source_degree(direction_result.second);
41
42 bool is_siren = siren_detection->Evaluate(audio_info->GetSignals(72000));
43 audio_detection->set_is_siren(is_siren);
44 auto signals =
45 audio_info->GetSignals(audio_data.microphone_config().chunk());
46 MovingResult moving_result = moving_detection->Detect(signals);
47 audio_detection->set_moving_result(moving_result);
48}
optional MicrophoneConfig microphone_config
Definition audio.proto:15

该类的文档由以下文件生成: