Voice Preview stops listening immediately after wakeword with compiled firmware

First I’ll say, using the factory firmware works fine, and I’ve confirmed I can revert to 25.9.0 from the restore website and things function again.

I’m working on building my own mww for it, so I started by simply cloning the official github, adding my wifi settings and activating the use_wake_word. Those are the only lines I changed in the YAML.

It compiles fine with one red warning:

esp_idf_size: error: unrecognized arguments: --ng
Warning: esp-idf-size exited with code 2

But, when running the compiled firmware, it detects the wakeword then immediately turns off the microphone. Have I missed something? EDIT: Near as I can figure the on_listening event never triggers from the VA. It does play the bullhorn sound, then nothing happens. No lights.

Look at the timestamps in the logs for using the wakeword:

[12:27:58.553][D][micro_wake_word:322]: Detected 'Okay Nabu' with sliding average probability is 0.94 and max probability is 1.00
[12:27:58.554][D][voice_assistant:605]: Signaling stop
[12:27:58.556][D][voice_assistant:477]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[12:27:58.557][D][voice_assistant:484]: Desired state set to IDLE
[12:27:58.558][D][voice_assistant:477]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[12:27:58.559][D][voice_assistant:623]: Event Type: 2
[12:27:58.560][D][voice_assistant:763]: Assist Pipeline ended
[12:27:58.575][D][voice_assistant:477]: State changed from STOPPING_MICROPHONE to IDLE

In less than 1/10th of a second it appears to go from detected the wakeword to turning off the microphone and goes back to idle.

Even if I’m misunderstanding the log, it never sends anything you say over to HA, and there’s no light indicating it’s listening.

Note I am able to use HA to send TTS to it, so I know it’s connected somehow through HA.

Note I specifically tried downloading the 25.9.0 version from github and compiling it and it has the same effect, so this isn’t a 25.10 issue- this must be a me issue. I just have no idea how to figure out what I’m missing.

Okay last self-reply. Am I supposed to build it using “esphome compile home-assistant-voice.factory.yaml”? Or “esphome compile home-assistant-voice.yaml” or whatever I might want to rename that file to?

Looks like the factory file includes the other, and when I build from the factory file I get a functional firmware.

EDIT: Okay that was the issue. Make my changes to the home-assistant-voice.yaml and then compile and install the home-assistant-voice.factory.yaml. Crisis averted.