Spokestack-iOS 14.2.1

Spokestack-iOS 14.2.1

Noel Weichbrodt 维护。



 
依赖:
TensorFlowLiteSwift~> 2.6.0
filter_audio~> 0.5.0
 

  • Spokestack

Spokestack iOS

Spokestack 为 iOS 平台提供了一个可扩展的语音识别管道。它包括用于语音活动检测(VAD)、唤醒词激活和自动语音识别(ASR)的各种内置语音处理器。

目录

功能

  • 语音活动检测
  • 支持两种不同的实现唤醒词激活
  • 简化的自动语音识别接口
  • 语音管道无缝集成 VAD 触发的唤醒词检测,使用设备上机器学习模型,并使用平台自动语音识别进行语音转录
  • 设备上的自然语言理解话语分类器
  • 简单的文本到语音 API

安装

CocoaPods 是 Cocoa 项目的依赖管理器。有关使用和安装说明,请访问其网站。要在使用 CocoaPods 的 Xcode 项目中集成 Spokestack,请在您的 Podfile 中指定它:

pod 'Spokestack-iOS'

使用

配置唤醒词激活的自动语音识别

import Spokestack
// assume that self implements the SpeechEventListener and PipelineDelegate protocols
let pipeline = SpeechPipelineBuilder()
    .addListener(self)
    .setDelegateDispatchQueue(DispatchQueue.main)
    .useProfile(.appleWakewordAppleSpeech)
    .setProperty("tracing", ".DEBUG")
pipeline.start()

此示例创建了一个使用VAD触发的唤醒词检测器来创建语音识别管道,这又激活了ASR,并将结果话语返回到SpeechEventListener观察者(在此示例中为self)。

请参阅SpeechPipelineSpeechConfiguration以获取更多配置文档。

文本到语音

// assume that self implements the TextToSpeechDelegate protocol
let tts = TextToSpeech(self, configuration: SpeechConfiguration())
tts.speak(TextToSpeechInput("My god, it's full of stars!"))

自然语言理解

// assume that self implements the NLUDelegate protocol
let nlu = try! NLUTensorflow(self, configuration: configuration)
nlu.classify(utterance: "I can't turn that light in the room on for you, Dave", context: [:])

故障排除

如果未将应用程序捆绑标识符从io.Spokestack.SpokestackFrameworkExample(与Spokestack组织相关联)更改,将会发生类似Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates的错误。

参考

SpokestackFrameworkExample项目是Spokestack库的使用参考实现,包括VAD、唤醒词、ASR、NLU和TTS组件的可运行示例。主屏幕上的每个组件都有一个按钮,可以开始、停止、预测或合成。组件屏幕启用了完整的调试跟踪,因此系统控制逻辑和调试事件将显示在XCode控制台中。

文档说明

入门、食谱和概念指南

逐步介绍常用模式库中概念讨论语音界面设计指南Android库中都可以找到,所有这些都可以在我们网站上找到:网站链接.

API参考

API参考可在Github找到。

部署

先决条件

  1. 确保已安装<code>git lfs</code>: https://git-lfs.github.com/。这用于管理<code>SpokestackFrameworkExample</code>中的大模型和元数据文件的存储。
  2. 确保已安装CocoaPods: <code>gem install cocoapods</code>(不要通过<code>brew</code>安装)。
  3. 确保在CocoaPods中注册: <code>pod trunk register YOUR_EMAIL --description='release YOUR_PODSPEC_VERSION'</code>

过程

  1. Spokestack-iOS.podspec 中增加 podspec 版本
  2. 执行 pod lib lint --use-libraries --allow-warnings,应通过所有检查
  3. git commit -a -m 'YOUR_COMMIT_MESSAGE' && git tag YOUR_PODSPEC_VERSION && git push --origin
  4. pod trunk push --use-libraries --allow-warnings

许可证

License

版权所有 2020 Spokestack, Inc.

根据Apache License,版本2.0(“许可证”)授权;除非适用法律要求或书面同意,否则不可使用此文件以外的任何方式使用。您可以在以下位置获得许可证副本:

  https://apache.ac.cn/licenses/LICENSE-2.0

除非适用法律要求或书面同意,否则在许可证下分发的软件按“原样”基础分发性,不提供任何明示或暗示的保证或条件。有关许可证的具体语言、权限和限制,请参阅许可证。