I'm trying to do a speech-to-text recognition for a wav. file I have, with Google, Google_Cloud, and Houndify.
I've noticed that with the latter two, they show no problem with profanities and but the Google speech recognizer filters the word, for example, f***, s***.
And this creates a problem for me as I want to do a sentimental analysis with LIWC and the program gives no profanity weights for words filtered like f***.
I've tried all of the above.
(1) Turning profanity filter off
recognizer_instance.recognize_google(audio_data: AudioData, key: Union[str, None] = None, language: str = "en-US", , pfilter: Union[0, 1], show_all: bool = False) -> Union[str, Dict[str, Any]]
https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst
(2) Remove profanity censor from Google Speech Recognition
But non of them solved the problem
r.recognize_google(example_audio)
---> what the f*** is wrong with you
But then,
r.recognize_google(example_audio, pfilter=0)
Gives
TypeError Traceback (most recent call last)
<ipython-input-21-b158a03c879c> in <module>
----> 1 r.recognize_google(example_audio, pfilter=0)
TypeError: recognize_google() got an unexpected keyword argument 'pfilter'
How should I solve this problem?
I know that many solutions written on Stackoverflow are referring to recognizer for Google Cloud API. I do have Google_Cloud (r.recognize_google_cloud
) working, so I want a solution for recognize_google not Google Cloud. I want to compare the results.