相关疑难解决方法(0)

Shiny ui.R - 标记错误("div",列表(...)) - 不确定错误在哪里

更新 - 12/17/2012 9am CDT:示例已更新为演示数据和完整代码.[/更新].

示例数据: https ://gist.github.com/4318774

描述: 我一直在玩新的Shiny包(喜欢它!)但是还不明白我遇到的错误runApp("").错误是Error in tag("div", list(...)): argument is missing.

我正在尝试创建一个交互式网络应用程序,用于人口统计数据的图形化探索.我使用以下作为指南:
https ://gist.github.com/4026749
http://rstudio.github.com/shiny/tutorial/

options(error= recover),我得到:

Listening on port 8100
Error in tag("div", list(...)) : argument is missing, with no default

Enter a frame number, or 0 to exit   

 1: runApp("//~~my app~~")
 2: tryCatch(while (TRUE) {
    serviceApp(ws_env)
}, finally = {
    timerCallbacks$clear()
    websocket_close(ws_env)
})
 3: tryCatchList(expr, classes, parentenv, handlers)
 4: serviceApp(ws_env)
 5: service(server = …
Run Code Online (Sandbox Code Playgroud)

r shiny

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

使 Python 语音识别速度更快

我一直在使用 Python 的谷歌语音识别。这是我的代码:

import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
   print("Say something!")
   audio = r.listen(source)
   print(r.recognize_google(audio))
Run Code Online (Sandbox Code Playgroud)

虽然识别非常准确,但大约需要4-5秒才能吐出识别出的文字。由于我正在创建一个语音助手,因此我想修改上面的代码以使语音识别速度更快。

有什么办法可以将这个数字降低到大约 1-2 秒吗?如果可能的话,我会尝试像 Siri 和 Ok Google 等服务一样快速地进行识别。

我对 python 很陌生,所以如果我的问题有一个简单的答案,我很抱歉。

python speech-recognition dictation google-speech-api

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