26 const std::string& respeaker_extrinsics_file,
32 audio_info->
Insert(audio_data);
33 auto direction_result =
36 respeaker_extrinsics_file,
39 *(audio_detection->mutable_position()) = direction_result.first;
40 audio_detection->set_source_degree(direction_result.second);
43 audio_detection->set_is_siren(is_siren);
47 audio_detection->set_moving_result(moving_result);
std::vector< std::vector< double > > GetSignals(const int signal_length)
void Insert(const apollo::drivers::microphone::config::AudioData &)
std::pair< Point3D, double > EstimateSoundSource(std::vector< std::vector< double > > &&channels_vec, const std::string &respeaker_extrinsic_file, const int sample_rate, const double mic_distance)
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)
MovingResult Detect(const std::vector< std::vector< double > > &signals)
bool Evaluate(const std::vector< std::vector< double > > &signals)
optional MicrophoneConfig microphone_config
optional float mic_distance
optional float sample_rate