espressif / esp-sr

Speech recognition
Other
556 stars 103 forks source link

Wake-up problem (AIS-1627) #102

Closed Sail-211010 closed 1 week ago

Sail-211010 commented 3 months ago

image Every time I wake up,If it is the first time to awaken, he must be in channel 2, and subsequent awakenings will be in channel 1,When in channel 2, the command word cannot be recognized, I want to know what to do, either do not enter channel 2 or make it recognize the command word in channel 2

sun-xiangyu commented 3 months ago

@Sail-211010 , Thank you for your feedback, I will test it.

Sail-211010 commented 3 months ago

Hi. I wonder if you've already tested it. I'm sorry, every time I try to reply to you, I get interrupted by other things, and then I forget to reply

Sail-211010 commented 2 months ago

@sun-xiangyu Hello, Did you get the results?

feizi commented 2 months ago

Hi @Sail-211010 , I wander if your wakenet_mode is DET_MODE_2CH_90 or DET_MODE_2CH_95? When you select DET_MODE_2CH_90 or DET_MODE_2CH_95, the channel of first time is random(this is a bug). Please set the wakenet_mode to DET_MODE_3CH_90 or DET_MODE_3CH_95 and try again.

Sail-211010 commented 2 months ago

hello @feizi What do I need to do in ArduinoIDE environment? I can't find the definition in the library file

feizi commented 2 months ago

It is a config item in afe_config. You can find afe_config in your code and change it.

afe_config_t afe_config = AFE_CONFIG_DEFAULT();
afe_config.wakenet_mode = DET_MODE_3CH_90;
Sail-211010 commented 2 months ago

@feizi image I have modified it, but it doesn't solve my problem I have tried DET_MODE_3CH_90 and DET_MODE_3CH_95 and they are also consistent with this parameter not configured

Sail-211010 commented 2 months ago

@feizi And it does not appear randomly, the first wake up after each power-on is channel 2, and the subsequent channel 2 will not appear

feizi commented 2 months ago

@Sail-211010 , Yes, by default, the first wake-up uses channel 2, which is the raw data from the microphone. Channels 0 and 1 are the data enhanced by BSS (Blind Source Separation). The reason for this choice is to consider that BSS may not have converged during the first wake-up, which could lead to the selection of the wrong channel, so the default is to choose the original data channel.

Sail-211010 commented 2 months ago

Hi @feizi How do I turn this off? I don't want channel 2 to happen, at least I need to turn it off first and test the actual effect

feizi commented 2 months ago

There is currently no option to turn off this setting; I need to regenerate a new version.

Sail-211010 commented 2 months ago

@feizi If possible, modify whether the function model and wakeword model of the English and Chinese models can be placed in a location that can be called image

Sail-211010 commented 2 months ago

Of course this is a different operation,This is a recommendation if you have a version update in this area in the future My English is not very good. Please don't mind if my presentation is not very good

In the current version, I need to enter the library file to modify these contents, whether there is a chance to solve this operation by calling some functions in the main program in the subsequent version

There is currently no option to turn off this setting; I need to regenerate a new version.

Sail-211010 commented 2 months ago

Above I am referring to the recommended update for the new firmware version (if you will be making this change). Thank you very much for your reply @feizi

feizi commented 2 months ago

Please try new master branch. You can set afe_config.fixed_first_channel=false to disable fixed channel number for first wake-up.

Sail-211010 commented 2 months ago

Okay, I'll try. Thanks

Sail-211010 commented 2 months ago

afe_config.fixed_first_channel=false t @feizi hi In which version is fixed_first_channel started? I can't configure this parameter in the current file, it shows no member

sun-xiangyu commented 2 months ago

The latest version is v1.9.0

Sail-211010 commented 2 months ago

image I don't know which firmware version you mean, is it convenient to correspond to the ESP32 Arduino version

sun-xiangyu commented 2 months ago

I think you need to update esp-sr manually by github or Esp Components Registry.

Sail-211010 commented 2 months ago

I understand. Thank you very much for your help. I'll test the feasibility later

Sail-211010 commented 2 months ago

@feizi

Hello, I looked at this library I want to use on Arduino. How do I operate it? Sensory manipulation can be complicated, okay?

feizi commented 2 months ago

Hi @Sail-211010 , This is an example in arduino-esp32 about how to use esp-sr on Arduino.

Sail-211010 commented 2 months ago

@feizi image Yes, I know this example, but I need to use the version of v1.9.0. Do you mean that this version is already used on 3.0.4

feizi commented 2 months ago

Here is the version of esp-sr in arduino-esp32. Arduino-esp32 has their own release plan and priority. If you want to use the latest esp-sr, I suggest you modify it manually.

Sail-211010 commented 2 months ago

@feizi image

Is there a tutorial for this modification,I'm not sure what needs to be changed or do I just need to change this version?

feizi commented 2 months ago

I think you can refer to idf-component-manager . In my experience, you just need to change the name of the version number and recompile. It will usually be downloaded to managed_components/espressif_esp-sr. If you find this folder, open the idf_component.yml file in this folder and make sure the version is v1.9.0. If not, you can clone esp-sr and copy it into this folder by manually.