mirror of
https://github.com/dscripka/openWakeWord.git
synced 2026-08-27 18:17:20 -04:00
fixed bug in generate_adversarial_clips function [skip ci]
This commit is contained in:
parent
19d59519ee
commit
ef118bd271
1 changed files with 1 additions and 1 deletions
|
|
@ -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}"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue