小编Wee*_*aa 的帖子

不允许 AppleScript 应用程序发送击键

我用 AppleScript 制作了一个名为 FRIDAY 的应用程序。当我告诉它“打开 chrome”时,它会打开谷歌浏览器,这是在脚本编辑器和脚本编辑器的外部工作。我还可以告诉它“打开一个新标签”并使用按键打开一个新标签:

-- this boolean is the reason this script keeps runing
set condition to false
say "Welcome sir"
set commands to {"what is todays date", "what time is it", "what is the time", "what day is it", "what month is it", "which month is it", "friday you up", "friday", "friday you tere", "you there", "empty the trash", "take out the trash", "clean up", "new tab", "next tab", "back", "take a nap", "go to sleep", "take …
Run Code Online (Sandbox Code Playgroud)

applescript keystroke systemevent applescript-objc system-error

18
推荐指数
2
解决办法
2万
查看次数

在python中交谈时将语音转换为文本

我制作了一个程序,可以让我说出来并将其转换为文本。我停止讲话后,它会转换我的声音。我想做的是在讲话时将语音转换为文本。

https://www.youtube.com/watch?v=96AO6L9qp2U&t=2s&ab_channel=StormHack的播放时间为2:31。

注意Tony显示器的右上角。它可以在通话时将他的声音转换为文本。我想做同样的事情。能做到吗

这是我的整个程序:

import speech_recognition as sr 
import pyaudio


r = sr.Recognizer()
with sr.Microphone() as source:
    print("Listening...")
    audio = r.listen(source)
    try:
        text = r.recognize_google(audio)
        print("You said : {}".format(text))
    except:
        print("Sorry could not recognize what you said")
Run Code Online (Sandbox Code Playgroud)

解决方案,提示,提示或其他任何东西,将不胜感激,在此先感谢您。

python text-to-speech voice-recording voice-recognition python-3.x

6
推荐指数
1
解决办法
422
查看次数