NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 49 forks source link

Comma in Keyword List #335

Closed aaronchantrill closed 3 years ago

aaronchantrill commented 3 years ago

Description

I recently started letting my Naomi respond to either 'Magicvoice' or 'Computer'. I was able to add the other name manually, but then when I ran Naomi with the "--repopulate" flag, I got an error about an invalid character. Turns out that it converted the two names to a comma separated list when presenting them, but they are also being returned as a string literal instead of being separated into a list.

Expected Behavior

If you have multiple names for your Noami, say "MAGICVOICE" and "COMPUTER", the keyword entry in profile should look like:

keyword:
- MAGICVOICE
- COMPUTER

not

keyword: "MAGICVOICE, COMPUTER"

Actual Behavior

The keyword list was returned as a string, not a list.

Possible Fix

I'd like to add a "return_type" attribute to the settings, in which you can specify the return type you want (boolean, integer, float, list, string) with string as the default.

Steps to Reproduce

  1. Install Naomi and give it two or more wakewords
  2. Run Naomi with the "--repopulate" flag and accept the default for wakeword (WORD1, WORD2)
  3. Pocketsphinx will die with a report that the wakeword contains an invalid character (the comma)