-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add allowlist and denylist options to demo #568
base: main
Are you sure you want to change the base?
Conversation
Changed Files
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
==========================================
+ Coverage 76.07% 76.18% +0.10%
==========================================
Files 46 46
Lines 3386 3414 +28
Branches 460 467 +7
==========================================
+ Hits 2576 2601 +25
- Misses 707 710 +3
Partials 103 103 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty straightforward, but also minimalist, is the feature requirement really that simple? For morphologically complex languages, this will be nearly impossible to use. And the deny list option will have little effect since it's trivial to circumvent with minor typos.
In any case, I didn't test this, but the code looks OK to me given the simple feature this PR implements.
|
I tested. the Deny and Allow list and by principle it all works. BUT things need to be exact matches. Like we were talking earlier could be a bit better . EX: case insensitive , ignore symbols ?
Is this example, " The same could be applied to the denylist.. We can approve this pull as-is and open a new "improvement" issue , this pull does answer the "spirit" of the intention of what is requested and works! Your call @roedoejet |
I forgot to add that some of the error log printing could be omited and only keep the last printed line.. ( the Oops, with the offending transaction. ) The rest of the traceback information is not needed / add noise to the logs...
|
1 similar comment
I forgot to add that some of the error log printing could be omited and only keep the last printed line.. ( the Oops, with the offending transaction. ) The rest of the traceback information is not needed / add noise to the logs...
|
Thanks so much for this y'all! I've added case sensitivity, word tokenization for the denylist, punctuation removal, and duplicate character attack prevention. This should be a bit better. Did you end up checking the speed with a large allow/deny list @marctessier ? |
No not yet , thanks for the reminder. ... I will prep a couple test for that and compare the timing in a few minutes. |
fixes #485
PR Goal?
Allow basic allowlist/denylist functionality in demo. If an allowlist is supplied, then only those words/utterances are allowed to be synthesized. If a denylist is supplied, then only words/utterances not on the denylist are allowed to be synthesized. The former is more secure since it is more restricted. The latter can be hacked (I've done Unicode normalization to prevent Unicode homograph attacks, but there are a lot of other possible attacks, probably beyond scope of this PR).
Fixes?
#485
Feedback sought?
Sanity. Any improvements to make this more secure would be appreciated; there are a lot of hacks to get around the denylist at least. Some ideas may be able to be incorporated into this PR if they're easy enough, otherwise we can create issues.
Priority?
0.1.0a5
Tests added?
No tests available for the demo.
How to test?
create a plain text file and pass it through when running the demo (
everyvoice demo fp.ckpt vocoder.ckpt --allowlist path_to_allowlist.txt
) Then only those words should be able to be synthesized. Everything else should throw an error in the demo GUI and through the APIConfidence?
Medium
Version change?
no
Related PRs?
none