我正在使用iOS 10内置语音识别来攻击一个小项目.我有使用设备麦克风的工作结果,我的语音被非常准确地识别.
我的问题是每个可用的部分转录都会调用识别任务回调,我希望它能够检测到人们停止说话,并在isFinal
属性设置为true的情况下调用回调.它没有发生 - 应用程序无限期地倾听.
是SFSpeechRecognizer
能够检测句末永远不会消失?
这是我的代码 - 它基于在互联网上找到的示例,它主要是从麦克风源识别所需的样板.我通过添加识别来修改它taskHint
.我也设置shouldReportPartialResults
为假,但它似乎被忽略了.
func startRecording() {
if recognitionTask != nil {
recognitionTask?.cancel()
recognitionTask = nil
}
let audioSession = AVAudioSession.sharedInstance()
do {
try audioSession.setCategory(AVAudioSessionCategoryRecord)
try audioSession.setMode(AVAudioSessionModeMeasurement)
try audioSession.setActive(true, with: .notifyOthersOnDeactivation)
} catch {
print("audioSession properties weren't set because of an error.")
}
recognitionRequest = SFSpeechAudioBufferRecognitionRequest()
recognitionRequest?.shouldReportPartialResults = false
recognitionRequest?.taskHint = .search
guard let inputNode = audioEngine.inputNode else {
fatalError("Audio engine has no input node") …
Run Code Online (Sandbox Code Playgroud) 我相信遵循了互联网上几乎所有的教程并阅读了很多 SO 答案,但我仍然陷入困境。
@Component
public class HealthCheck implements HealthIndicator {
@Override
public Health health() {
return Health.up().build();
}
}
Run Code Online (Sandbox Code Playgroud)
management.endpoints.web.exposure.include: "*"
management.endpoint.health.show-details: ALWAYS
Run Code Online (Sandbox Code Playgroud)
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
Run Code Online (Sandbox Code Playgroud)
id 'org.springframework.boot' version '2.2.0.RELEASE'
Run Code Online (Sandbox Code Playgroud)
@SpringBootApplication
(隐含地带有@ComponentScan
)。management.endpoints.web.exposure.include: "*"
management.endpoint.health.show-details: ALWAYS
Run Code Online (Sandbox Code Playgroud)
我的自定义运行状况检查必须测试 Apache Kafka,但为了简洁起见,我跳过了详细信息。尽管如此,调用/actuator/health
端点我得到相同的默认结果:
{
"status": "UP",
"components": {
"diskSpace": {
"status": "UP",
"details": {
"total": 250685575168,
"free": 99168997376,
"threshold": 10485760
}
},
"ping": {
"status": "UP"
}
} …
Run Code Online (Sandbox Code Playgroud) 我知道这是一个已知问题,并且尝试了几次答案,但这次我发现我觉得很奇怪的情况。日志告诉可怕的错误 65以及errSecInternalComponent
何时对第一个 Pod 进行代码签名。
bundle exec fastlane appstore
,它失败security unlock-keychain
在构建之前,我已将命令包含在 shell 脚本中。
捆绑更新 导出 FASTLANE_DISABLE_COLORS=1 出口APP_IDENTIFIER=com.example.MyApp security unlock-keychain -p topsecret ~/Library/Keychains/codesign.keychain && bundle exec fastlane appstore
我也尝试过其他巫术,比如用钥匙扣做其他魔法
当直接在 CI 服务器控制台(或通过远程桌面)上运行时,它可以完美运行,不会提示输入用户密码等。我想知道有什么区别?
Fastlane 版本是2.106.0(最新)。
执行 Embed Pods Frameworks 时,构建会像其他用户一样失败:
? 运行脚本'[CP] Embed Pods Frameworks' ** 存档失败 ** 以下构建命令失败: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/IntermediateBuildFilesPath/BackOffice.build/Release. /Script-7E4F6707694226143D2E7E0B.sh (1 …