Table of Contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# Azure subscription key and service region | |
subscription_key = 'YourAzureSubscriptionKey' | |
service_region = 'YourServiceRegion' | |
# Set up the TTS endpoint | |
tts_endpoint = f'https://{service_region}.tts.speech.microsoft.com/cognitiveservices/v1' | |
# Set up the headers for the HTTP request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynput import keyboard, mouse | |
from pynput.keyboard import Key, Controller as KeyboardController | |
import requests | |
import clipman | |
clipman.init() | |
keyboard_controller = KeyboardController() | |
text_buffer = [] | |
def correct_text(text): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key | Mac | Windows | Linux | Notes | |
---|---|---|---|---|---|
rbKeyUp | 126 | 26 | 103 | ||
rbKeyDown | 125 | 28 | 108 | ||
rbKeyLeft | 123 | 25 | 105 | ||
rbKeyRight | 124 | 27 | 106 | ||
rbKeyBackspace | 117 | 8 | 14 | ||
rbKeyEnter | 76 | * | 28 | ||
rbKeyHome | 115 | 36 | 102 | ||
rbKeyEnd | 119 | 35 | 107 | ||
rbKeyPageDown | 121 | 34 | 109 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CryptoKit | |
import Foundation | |
struct EmptyResponse: Decodable {} | |
class ReftabClient { | |
let publicKey: String | |
let secretKey: String | |
let baseURL = "https://www.reftab.com/api" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** So really you'd want to update that training text continually too - but you ideally need a way for people correcting this training text. Something that was easy enough with dasher although undcoumented. You literally edit the text file. | |
Also note this for autocorrection - but not sure how we would implement this | |
**/ | |
extension PPM { | |
// Generate candidate words by swapping adjacent characters | |
func generateCandidates(word: String) -> [String] { | |
var candidates: [String] = [] | |
var chars = Array(word) | |
for i in 0..<(chars.count - 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import json | |
import unicodedata | |
def xkb_to_unicode(key_code): | |
# Add your custom mapping here | |
custom_mapping = { | |
"adiaeresis": "ä", | |
"odiaeresis": "ö", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pyperclip | |
pyttsx4 | |
configparser | |
translate | |
TTS | |
pyaudio | |
gTTS | |
gspeak | |
pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynput.mouse import Controller | |
from pynput.keyboard import Listener, Key | |
import time | |
# Create an instance of the mouse controller | |
mouse = Controller() | |
# Set the initial position of the cursor | |
x, y = mouse.position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property delayInterval : 15 -- seconds | |
on run | |
activate | |
tell application "System Events" to set UIAccessStatus to UI elements enabled | |
end run | |
on idle | |
try | |
tell application "System Events" | |
tell process "NotificationCenter" |
NewerOlder