Jump to content

Recommended Posts

453=castro_
Posted (edited)

Uses a better voice recognition tool (powered by google) to turn speech to text and posts it on game chat (global/team)

 

Installation:

- add these 2 commands (team/global)
speech2text.zip
- In each command you imported, set the button that will start recording on press and will later send to chat on release, example: change "joy 3 button 4" in 2 places:

image.png.93558f58e91bf8ef8a8da74bdee21f97.png

- In chrome (or any browser that supports it) install tampermonkey 
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
-Click on the tampermonkey extension icon and click  "Create a new script"

image.png.fe54e4d48b2e128202ca7f8b4a0ecbef.png

- Copy and paste

// ==UserScript==
// @name         voice
// @version      0.1
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @author       cpt_castro
// @match        https://dictation.io/speech
// @icon         https://www.google.com/s2/favicons?domain=dictation.io
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        unsafeWindow
// ==/UserScript==

(function() {
    'use strict';
    $(document).keydown(function(e) {
        console.log(e)
        if(e.key !=='m'){
            return
        }
        if(e.ctrlKey){
            unsafeWindow.dictation('clear');
            $('.btn-mic.btn--primary-1')[0].click();
        }
        if(e.altKey){
            var text = $('#speech').text().trim().toLowerCase();
            GM_setClipboard (text);
            unsafeWindow.dictation('clear');
            $('.btn-mic.bg--pinterest')[0].click();
        }
    });
})();

- Open https://dictation.io/speech in a single tab (if you press ctrl+m it will start recording, if you press alt+m It will stop recording and clear content, if this is not working you did something wrong creating the script, make sure you copied all the content correctly)

- Open the game

- Press and hold the button you have setup for voice to team chat, wait for a beep sound a start talking, then release (same thing with button for global chat)

 

Enjoy, any feedback appreciate it, if you have issues will try to help, just put a detailed description of what is wrong, screenshots/videos will help me find the problem.


Thanks to Wazoo-VR based on 

 

Edited by 453=castro_
typo
  • Like 2
  • Thanks 1
  • 2 weeks later...
Posted

This seems exactly what I’m looking for. Going to test this tomorrow. Will report. 

453=castro_
Posted (edited)

hope it works, made a version to fix when voice attack fails to play sounds 
 

// ==UserScript==
// @name         voice
// @version      0.2
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @author       cpt_castro
// @match        https://dictation.io/speech
// @icon         https://www.google.com/s2/favicons?domain=dictation.io
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        unsafeWindow
// ==/UserScript==
var audio1 = new Audio('https://audio-previews.elements.envatousercontent.com/files/344128299/preview.mp3');
var audio2 = new Audio('https://audio-previews.elements.envatousercontent.com/files/344127436/preview.mp3');
(function() {
    'use strict';
    $(document).keydown(function(e) {
        if(e.key !=='m'){
            return
        }
        if(e.ctrlKey){
            unsafeWindow.dictation('clear');
            $('.btn-mic.btn--primary-1')[0].click();
            audio1.play();
        }
        if(e.altKey){
            var text = $('#speech').text().trim().toLowerCase();
            GM_setClipboard (text || ' ');
            unsafeWindow.dictation('clear');
            $('.btn-mic.bg--pinterest')[0].click();
            audio2.play();
        }
    });
})();

 

Edited by 453=castro_
  • Like 1
  • 1 month later...
TCW_DirtyMike0330
Posted
On 7/4/2021 at 10:30 PM, 453=castro_ said:

Uses a better voice recognition tool (powered by google) to turn speech to text and posts it on game chat (global/team)

 

Installation:

- add these 2 commands (team/global)
speech2text.zip
- In each command you imported, set the button that will start recording on press and will later send to chat on release, example: change "joy 3 button 4" in 2 places:

image.png.93558f58e91bf8ef8a8da74bdee21f97.png

- In chrome (or any browser that supports it) install tampermonkey 
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
-Click on the tampermonkey extension icon and click  "Create a new script"

image.png.fe54e4d48b2e128202ca7f8b4a0ecbef.png

- Copy and paste

// ==UserScript==
// @name         voice
// @version      0.1
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @author       cpt_castro
// @match        https://dictation.io/speech
// @icon         https://www.google.com/s2/favicons?domain=dictation.io
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        unsafeWindow
// ==/UserScript==

(function() {
    'use strict';
    $(document).keydown(function(e) {
        console.log(e)
        if(e.key !=='m'){
            return
        }
        if(e.ctrlKey){
            unsafeWindow.dictation('clear');
            $('.btn-mic.btn--primary-1')[0].click();
        }
        if(e.altKey){
            var text = $('#speech').text().trim().toLowerCase();
            GM_setClipboard (text);
            unsafeWindow.dictation('clear');
            $('.btn-mic.bg--pinterest')[0].click();
        }
    });
})();

- Open https://dictation.io/speech in a single tab (if you press ctrl+m it will start recording, if you press alt+m It will stop recording and clear content, if this is not working you did something wrong creating the script, make sure you copied all the content correctly)

- Open the game

- Press and hold the button you have setup for voice to team chat, wait for a beep sound a start talking, then release (same thing with button for global chat)

 

Enjoy, any feedback appreciate it, if you have issues will try to help, just put a detailed description of what is wrong, screenshots/videos will help me find the problem.


Thanks to Wazoo-VR based on 

 

This works pretty well, thanks!

Posted

This absolutely amazing. Thank you!

  • 3 years later...
VL_Joffski
Posted

This is exactly what I’ve been looking for, but inevitably it doesn’t seem to work for me! 
dictation.io doesn’t start recording with the ctrl +m command - only cl in clicking  the start button in the browser window. Is this a new thing? It also doesn’t send the text from dictation.io to the game. I wonder if the code’s been changed since this post.

 Great work though, thank you.

  • LukeFF locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...