Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Grumbles.js – Detects when your users swear out loud (knpw.rs)
91 points by kpthunder on Sept 3, 2016 | hide | past | favorite | 45 comments


Fun fact: this won't tell you which bad word. Google's implementation of the speech API returns asterisks for words it deems bad. See:

https://github.com/knpwrs/grumbles.js/blob/master/src/grumbl...

It's also interesting to see which words Google determines is bad, and which they mysteriously don't. The API does real time processing of sentence structure and will return "<three asterisks> on me" and "cum to the park" correctly, based on intent. (Sorry for the offensive speech!)

For a side project I needed to find every single English word/phrase the API would filter. Stumbled upon that in amazement.

(Side note: speaking a long list of bad words into a microphone very slowly was the most fun QA I've done)


I get that this is a free service and all, but I find that ridiculous. They are basically crippling the functionality of a service that is global and it is not aimed at a particular application, based on a very localized interpretation of what is nice to say and what is not... this should be controlled at the application level, the API providing at most hints about the tone.

Depending on what you use it on, this could render the service useless. Imagine using it to, I don't know, trying to identify Pulp Fiction sentences against a corpus of scripts. It would fail spectacularly.

Another example context on where this could fail very quickly is when considering people from other languages, e.g., if I'm not wrong, saying "Jesus!" might be impolite in (some contexts of) the US. In Spain, we say "Jesus!" when you sneeze, instead of "Bless you!" (and, in general, we are outrageously foul-mouthed compared to the US).


By the way, I can't edit my comment any longer, but when I said:

> In Spain, we say "Jesus!" when you sneeze, instead of "Bless you!" (and, in general, we are outrageously foul-mouthed compared to the US).

..it may sound as if "¡Jesús!" ("Bless you!") is foulmouthed - when in fact is something a four-year-old would typically say.


I always found this hilarious, my phone won't let me swear in a text I am sending using voice to text but it will gladly boom "fuck" over my car's Bluetooth when someone sends me a text with swear words.


Since the voice recognition isn't perfect it means there is a chance it could make false positives and write a bad word you didn't say. Then people complain to Google or sue them. Similarly google search won't auto suggest offensive words or certain libelous statements (e.g. "X is a criminal", even if they are, and even if its a common search phrase.)


Sue them for what? Hurt feelings?


Yeah, like I said in response to another comment:

> My original idea was going to involve a dependency on one of the bad words lists available on npm, but then I saw the API censors said words and thought, "Oh, that's easy."


I really wish I could turn this "feature" off. Not only is it annoying but it clearly shows people when I am using voice to text and when I am typing.


You can turn it off on Android.


Any reason it's "cum" and not "come to the park"?


I think he's trying to show that the speech API is smart enough to understand the context of the phrase and is not just blindly replacing words based on spelling.


I wonder how it would handle "I've come in my shorts today" vs "I've cum in my shorts today".


Ignoring the unlikelihood of someone actually authorizing microphone permissions (because it's no fun if we take that into consideration), what are some good use cases for this library.

Reminds me of those rumors that swearing at an automated phone system will usually cause it to direct you to a human operator. I've never given it a try myself to see if it's true.


A code review app can measure WTFs / minute, as in the classic web comic: http://imgur.com/a/BHlkA


I wonder how many people let random apps/sites access a microphone.


"Your browser does not support the SpeechRecognition API. :("

HURRAY! And, it never shall.


I think the most interesting part of this for me is the fact it relies on the the SpeechRecognition api to return swear words redacted with asterisks.

See for example George Carlin's "Seven dirty words" as returned by the SpeechRecognition demo https://cl.ly/3A1F0r3U1H1D/Screen%20Shot%202016-09-03%20at%2...


Agreed, it's neat to see an anti-feature being subverted such that it becomes a feature.

(The anti-feature being the enforcement of American prudity onto what should be an indifferent API.)


My original idea was going to involve a dependency on one of the bad words lists available on npm, but then I saw the API censors said words and thought, "Oh, that's easy."


You are fined one credit for a violation of the Verbal Morality Statute.


Nifty idea - but I couldn't trigger it. Must be because it detected my sweet choir boy nature, and knew that my attempts at profanity was 'cute' rather than grumpy!


Tinfoil hat aside, I kinda like this.

We work with a decent number of older, non technical people, and our product team would love to be a fly on the wall to hear where they're frustrated in the product. Obviously due to security concerns we could never implement something like this, but in a perfect world this would be a killer feature.


What the fuck is this shit doing on HN?

(Just kidding, for those who can't detect sarcasm. That's a killer idea - build an app that detects sarcasm in text, deploy on HN, have a happier community.)


IBM's Watson doesn't detect sarcasm, but it does detect anger in your post.

https://tone-analyzer-demo.mybluemix.net/


Wow, because I really want to have my computer listening in on everything I say and snitching (with context) to an unknown listener if I say a bad word.

Cool tech. Uncool use.


because that's not creepy.


It works but Chrome's Web Speech api seems slow. Test at https://www.google.com/intl/en/chrome/demos/speech.html. The Web Speech api doesn't work on mobile browsers, would be a lot cooler if it did.


I don't like the idea of streaming every visitor's audio to Google servers as they're viewing the site.


The Speech Recognition API doesn't go to anyone's servers, it's entirely done in the browser, and is fully available offline as well.


Is it open sourced? Can it be used on Linux?

Any links are appreciated


Ok, I know this is pedantic, but grumbling is not shouting swear words - in fact it's the opposite of shouting.


Ha ha, funny idea! After examining my own behaviour the other day I realised that if I ever owned a store that faced the street, I would totally put a microphone in the window to get customer feedback from after-hours window-shoppers: you can't solicit that kind of honesty!


At the grocery store the other day, my wife and I were deciding between a few items. The thought occurred to me that a microphone in the aisle would be huge for customer feedback! A few seconds later I realized that it would just be a feed of people yelling at their kids/spouses... not very helpful.


Actually yu can and someone already built and sold a business around it to the tune of nearly $100M.


Neat idea but the piece of shit ;) couldn't detect me calling it one.



Geeze Louis! What the heck? Gosh darn it!

Is there a southern grandma setting?


FYI, only single words worked: fu## and sh##. Didn't print out entire phrases, even when I simplified the swear words (stemmed them).


Although the demo takes some time this is awesome! Thanks for sharing


Does this mean that Chrome is always listening on my computer's internal microphone?


You have to allow it first on a per-website basis


You actually have to allow it per-website per-visit (not even per-session).


no, it's per domain.

You only need to per-visit when it's an insecure localhost endpoint or something similar IIRC. (or if you have an extension which clears that setting every page load)


Which I'm betting nobody will do


A few folks in this thread already have.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: