Convert audio to text using GCP Speech API
pip install --upgrade google-cloud-speech
#!/bin/bash| // ==UserScript== | |
| // @name Best secret highlighter | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author petitchamp | |
| // @match https://www.bestsecret.fr/*category.htm* | |
| // @match https://www.bestsecret.fr/search.htm* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=bestsecret.fr | |
| // @grant none |
| import time | |
| from requests import post | |
| from queue import Queue | |
| from logger import logger | |
| from datetime import datetime | |
| NoCaptchaTaskProxyless = "NoCaptchaTaskProxyless" | |
| SERVER = 'https://api.yescaptcha.com' |
| #include <iostream> | |
| #include <algorithm> | |
| #include <string> | |
| #include <vector> | |
| using namespace std; | |
| void FindWord(string &TargetWord, string &Phrase) | |
| { | |
| cout << "Find: " << TargetWord << " in: \""<< Phrase<<"\"" << endl; |
| import cv2.cv as cv | |
| import tesseract | |
| gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE) | |
| cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY) | |
| api = tesseract.TessBaseAPI() | |
| api.Init(".","eng",tesseract.OEM_DEFAULT) | |
| api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz") | |
| api.SetPageSegMode(tesseract.PSM_SINGLE_WORD) | |
| tesseract.SetCvImage(gray,api) | |
| print api.GetUTF8Text() |