From ef118bd271f12bc805d18e925d2dd9ffd4598a4a Mon Sep 17 00:00:00 2001 From: dscripka Date: Tue, 24 Oct 2023 21:27:08 -0400 Subject: [PATCH] fixed bug in generate_adversarial_clips function [skip ci] --- openwakeword/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwakeword/data.py b/openwakeword/data.py index 6e90969..c43da5d 100755 --- a/openwakeword/data.py +++ b/openwakeword/data.py @@ -962,7 +962,7 @@ def generate_adversarial_texts(input_text: str, N: int, include_partial_phrase: query_exps = [] phones = phones.split() adversarial_words = [] - if len(phones) == 2: + if len(phones) <= 2: query_exps.append(" ".join(phones)) else: query_exps.extend(phoneme_replacement(phones, max_replace=max(0, len(phones)-2), replace_char="(.){1,3}"))