简体   繁体   English

在带有 Bluemix 的 iOS 应用程序中使用 Watson Speech to Text 服务

[英]Using the Watson Speech to Text service in an iOS app with Bluemix

We are creating an iOS application on Bluemix and we are trying to link the Speech to Text service.我们正在 Bluemix 上创建一个 iOS 应用程序,我们正在尝试将 Speech to Text 服务链接起来。 We've bound the service to the application, but now we don't know how to utilize the service within our app.我们已经将服务绑定到应用程序,但现在我们不知道如何在我们的应用程序中使用该服务。

How do we use the Speech to Text API in our iOS app with our back end hosted on Bluemix?我们如何在后端托管在 Bluemix 上的 iOS 应用程序中使用 Speech to Text API?

You have two options:您有两个选择:

  1. You make the call to the Watson Speech to Text service directly from your iOS application.您可以直接从 iOS 应用程序调用 Watson Speech to Text 服务。 You can either invoke the REST API directly from your iOS app using something like RestKit , or you can use the Watson Speech iOS SDK to make that invocation easier.您可以使用RestKit 之类的工具直接从您的 iOS 应用程序调用 REST API,也可以使用Watson Speech iOS SDK简化该调用。

  2. You can send all the received audio to your app on Bluemix (serving as a mobile back end) and invoke the Speech to Text REST API from there.您可以将所有接收到的音频发送到您在 Bluemix(作为移动后端)上的应用程序,并从那里调用 Speech to Text REST API。 This will offload computation from the mobile device, but will most likely increase the latency of getting back the audio transcription to your mobile phone.这将卸载移动设备的计算,但很可能会增加将音频转录返回到您的手机的延迟。

Additionally, there is now a Watson iOS SDK which includes the Speech to Text service.此外,现在还有一个Watson iOS SDK ,其中包括 Speech to Text 服务。 This seems like an ideal solution over using the REST API directly if you plan to do a lot of work with Watson.如果您计划使用 Watson 进行大量工作,这似乎是直接使用 REST API 的理想解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM