mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
bugfix: fix fftr error
This commit is contained in:
parent
f7fef69938
commit
c420a5616b
@ -3,7 +3,7 @@ description: esp_sr provides basic algorithms for Speech Recognition application
|
||||
url: https://github.com/espressif/esp-sr
|
||||
dependencies:
|
||||
idf: ">=5.0"
|
||||
espressif/esp-dsp: ">1.5.1"
|
||||
espressif/esp-dsp: "1.6.0"
|
||||
files:
|
||||
exclude:
|
||||
- ".github"
|
||||
|
||||
48
include/esp32/esp_afe_doa.h
Normal file
48
include/esp32/esp_afe_doa.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef _ESP_AFE_DOA_H_
|
||||
#define _ESP_AFE_DOA_H_
|
||||
|
||||
#include "esp_doa.h"
|
||||
#include "esp_afe_config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
doa_handle_t *doa_handle;
|
||||
afe_pcm_config_t pcm_config;
|
||||
int16_t *leftdata;
|
||||
int16_t *rightdata;
|
||||
int frame_size;
|
||||
} afe_doa_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize SRP-PHAT processor
|
||||
* @param input_format The input format
|
||||
* @param fs Sampling rate (Hz), e.g., 16000
|
||||
* @param resolution Angular search resolution (degrees), e.g., 20
|
||||
* @param d_mics Microphone spacing (meters), e.g., 0.06
|
||||
* @param input_timedate_samples input timedate samples, e.g., 1024
|
||||
* @return Initialized doa_handle_t object pointer, Recommend using the above configuration for better performance
|
||||
*/
|
||||
afe_doa_handle_t *afe_doa_create(const char *input_format, int fs, float resolution, float d_mics, int input_timedate_samples);
|
||||
/**
|
||||
* @brief Process audio frame for direction estimation
|
||||
* @param handle doa_handle_t instance pointer
|
||||
* @param indata Input audio data, format is define by input_format.
|
||||
* @return Estimated sound direction in degrees, e.g., 0-180
|
||||
*/
|
||||
float afe_doa_process(afe_doa_handle_t *handle, const int16_t *indata);
|
||||
/**
|
||||
* @brief Release all allocated resources
|
||||
* @param doa doa_handle_t instance pointer to be freed
|
||||
*/
|
||||
void afe_doa_destroy(afe_doa_handle_t *handle);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_AFE_DOA_H_ */
|
||||
48
include/esp32p4/esp_afe_doa.h
Normal file
48
include/esp32p4/esp_afe_doa.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef _ESP_AFE_DOA_H_
|
||||
#define _ESP_AFE_DOA_H_
|
||||
|
||||
#include "esp_doa.h"
|
||||
#include "esp_afe_config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
doa_handle_t *doa_handle;
|
||||
afe_pcm_config_t pcm_config;
|
||||
int16_t *leftdata;
|
||||
int16_t *rightdata;
|
||||
int frame_size;
|
||||
} afe_doa_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize SRP-PHAT processor
|
||||
* @param input_format The input format
|
||||
* @param fs Sampling rate (Hz), e.g., 16000
|
||||
* @param resolution Angular search resolution (degrees), e.g., 20
|
||||
* @param d_mics Microphone spacing (meters), e.g., 0.06
|
||||
* @param input_timedate_samples input timedate samples, e.g., 1024
|
||||
* @return Initialized doa_handle_t object pointer, Recommend using the above configuration for better performance
|
||||
*/
|
||||
afe_doa_handle_t *afe_doa_create(const char *input_format, int fs, float resolution, float d_mics, int input_timedate_samples);
|
||||
/**
|
||||
* @brief Process audio frame for direction estimation
|
||||
* @param handle doa_handle_t instance pointer
|
||||
* @param indata Input audio data, format is define by input_format.
|
||||
* @return Estimated sound direction in degrees, e.g., 0-180
|
||||
*/
|
||||
float afe_doa_process(afe_doa_handle_t *handle, const int16_t *indata);
|
||||
/**
|
||||
* @brief Release all allocated resources
|
||||
* @param doa doa_handle_t instance pointer to be freed
|
||||
*/
|
||||
void afe_doa_destroy(afe_doa_handle_t *handle);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_AFE_DOA_H_ */
|
||||
48
include/esp32s3/esp_afe_doa.h
Normal file
48
include/esp32s3/esp_afe_doa.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef _ESP_AFE_DOA_H_
|
||||
#define _ESP_AFE_DOA_H_
|
||||
|
||||
#include "esp_doa.h"
|
||||
#include "esp_afe_config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
doa_handle_t *doa_handle;
|
||||
afe_pcm_config_t pcm_config;
|
||||
int16_t *leftdata;
|
||||
int16_t *rightdata;
|
||||
int frame_size;
|
||||
} afe_doa_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize SRP-PHAT processor
|
||||
* @param input_format The input format
|
||||
* @param fs Sampling rate (Hz), e.g., 16000
|
||||
* @param resolution Angular search resolution (degrees), e.g., 20
|
||||
* @param d_mics Microphone spacing (meters), e.g., 0.06
|
||||
* @param input_timedate_samples input timedate samples, e.g., 1024
|
||||
* @return Initialized doa_handle_t object pointer, Recommend using the above configuration for better performance
|
||||
*/
|
||||
afe_doa_handle_t *afe_doa_create(const char *input_format, int fs, float resolution, float d_mics, int input_timedate_samples);
|
||||
/**
|
||||
* @brief Process audio frame for direction estimation
|
||||
* @param handle doa_handle_t instance pointer
|
||||
* @param indata Input audio data, format is define by input_format.
|
||||
* @return Estimated sound direction in degrees, e.g., 0-180
|
||||
*/
|
||||
float afe_doa_process(afe_doa_handle_t *handle, const int16_t *indata);
|
||||
/**
|
||||
* @brief Release all allocated resources
|
||||
* @param doa doa_handle_t instance pointer to be freed
|
||||
*/
|
||||
void afe_doa_destroy(afe_doa_handle_t *handle);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_AFE_DOA_H_ */
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user