小编Tom*_*ner的帖子

SFSpeechRecognizer - 检测话语结束

我正在使用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)

ios sfspeechrecognizer

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

Spring Boot 自定义运行状况指示器未显示

我相信遵循了互联网上几乎所有的教程并阅读了很多 SO 答案,但我仍然陷入困境。

1.简单的健康检查

@Component
public class HealthCheck implements HealthIndicator {

    @Override
    public Health health() {
        return Health.up().build();
    }

}
Run Code Online (Sandbox Code Playgroud)

2. Application.yaml 配置为显示所有详细信息:

management.endpoints.web.exposure.include: "*"
management.endpoint.health.show-details: ALWAYS
Run Code Online (Sandbox Code Playgroud)

3. Spring-boot-actuator 作为依赖项包含在内:

    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-web'
Run Code Online (Sandbox Code Playgroud)

4.最近发布的Spring Boot:

id 'org.springframework.boot' version '2.2.0.RELEASE'
Run Code Online (Sandbox Code Playgroud)

5. 主应用程序类注释为@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)

java spring spring-boot spring-boot-actuator

8
推荐指数
1
解决办法
5999
查看次数

Jenkins 或远程登录上的 Fastlane 错误 65

我知道这是一个已知问题,并且尝试了几次答案,但这次我发现我觉得很奇怪的情况。日志告诉可怕的错误 65以及errSecInternalComponent何时对第一个 Pod 进行代码签名。

  • 在 Jenkins 上运行时,我的构建失败
  • 在 CI 机器上手动运行,通过 SSH 登录并执行时bundle exec fastlane appstore,它失败
  • 当我登录远程桌面或物理访问 CI 机器时,构建SUCCEEDS

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 …

ios fastlane

5
推荐指数
1
解决办法
1589
查看次数