12/19/2023 0 Comments Google speech to text api php![]() ![]() Loop % () determine number of new messages (updates) If oUpdates.ok check if json answer was "ok" : true Try oUpdates := JSON.Load(updates) create an AHK object from the JSON string Msgbox % "JSON response:`n" updates remove, if you use a textfile Updates := GetUpdates(botToken, (offset+1)) get (new) updates from your bot as JSON string keep track of old messages UpdateTimer: checks constantly for user input in your bot SetTimer, UpdateTimer, 15000 set to 1000 ms = 1 second or similar, if you want (first comment the msgboxes out and a textfile path)Įsc::ExitApp hit Escape to stop the script OCustomers := "My Name" add your chat id (and name if you want) to the customer object for testing purposes OCustomers := create Object for user ids who are allowed to send messages to your Textfile := "" add file (path and) name to save the Telegram messages But with a personal Telegram bot - no problem it is much cooler and no secretary neededīut A_Ahkuser's discovery looks very interesting, too.Ĭode: Select all #include json.ahk Coco's JSON library, get it here: īotToken := "xxxxxxxxx:yyyyyyyyyyyyyyyyyyy" add your Telegram bot token ![]() Biggest problem probably, you simply cannot send a WhatsApp message to yourself (if I am not mistaken - perhaps if you could create a one person group or by just sending it to your secreaty instead). ![]() You could probably do something similar with your smartphone in combination with the 'WhatsApp Desktop' app (same Google speech recognition) - but it will be less flexible and reliable, because they don't have a bot API. After that, you could still copy the text from the Telegram Desktop app and paste it somewhere by hand (or means of AHK). You could still extract these messages at your computer via the bot at a later time (you will have 24 hours). You could even dictate messages while on the road and your bot offline. Let me know, if you are interested - shouldn't take too long to set up. And with dictation, there is not even (much) parsing involved (only from Google, obviously), which should make it easy. I can help you with that - I think I posted a basic example how to connect to a bot and read out all the messages it gets, some time ago. The bot, running on your computer via AHK and using the Telegram API, could automatically process everything sent to him (by you or also by others, if you allow it) and store it in a text/word/email/whatever file (everything you can do with AHK, basically).įor interfacing the bot this way, you will need to use just a tiny part of the Telegram bot API ( ). (I assume, iPhone's speech recognition could be used in the same way with a bot.) Ladolcevita.PNG (16.99 KiB) Viewed 4450 timesĪs an alternative - if you are willing to dictate into your smartphone/tablet/android device - you could a create a personal bot in Telegram messenger and use the google speech API that is integrated with it. I made it before GeekDude poped out of its magician's hat its outstanding chrome.ahk library so, as of now, it can be possible to execute the javascript contained in without using any extension. The Dictation class is able to call a user-defined callback for the following events: onInterimResult and onResult. You can optionally hide the chrome instance which is autmatically closed when the script exits. 181 (64 bits) and ahk v1.1.28.00 (Windows 8.1) in russian, spanish, french and. The repo include a showcase script providing a basic interface which puts in the clipboard recognized speech, if any. deep in hack country > Dictation-interface. If its for your personal use, I guess it is. Jekko1976 wrote:in your opinion, is it possible for AHK to hook the Google speech to text API and make a dictation script? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |