简体   繁体   English

如何检测WatchKit语音到文本输入的语言?

[英]How to detect language of the WatchKit voice-to-text input?

I am trying to get some input from the user on the Apple Watch using presentTextInputControllerWithSuggestions . 我正在尝试使用presentTextInputControllerWithSuggestions从Apple Watch上的用户那里获得一些输入。 I wonder what happens if user speaks multiple languages – is there a way to detect which language has he spoken? 我想知道如果用户说多种语言会发生什么 - 有没有办法检测他说的是哪种语言?

Also, is there a way to find out what languages are set in his preferences? 另外,有没有办法找出他的偏好中设置了哪些语言?

Not having a Watch on hand, I don't think anyone here knows. 我手边没有手表,我认为这里没有人知道。 ( Edit: this was first posted before the Watch launched. ) But even though it'd be really cool if there were dictation software that could guess cual idiomaで話しています from word to word, watchOS is no different than iOS in that respect. 编辑:这是在Watch启动之前首次发布的。 )但是即使有一个听写软件能够逐字逐句地猜测cual idiomaで话しています,但是在这方面watchOS与iOS没有什么不同,即使它真的很酷。 。

In iOS, Siri listens only in the language you set in Settings, and dictation listens only in the language of the active keyboard (whose microphone button you pressed to start dictation). 在iOS中,Siri仅使用您在“设置”中设置的语言进行收听,并且听写仅以活动键盘的语言(您按下的麦克风按钮开始听写)进行监听。

In watchOS, Siri likewise has a set language. 在watchOS中,Siri同样有一套语言。 Dictation is based on the keyboard language last used on your paired phone, but you can also change the language during text entry with a force press. 听写是基于最后在配对手机上使用的键盘语言,但您也可以在强制按下时在文本输入期间更改语言。 That's a user choice for a system service, so it's opaque to the app, just like choice of keyboard is to an iOS app. 这是系统服务的用户选择,因此对应用程序来说是不透明的,就像键盘选择iOS应用程序一样。 (You're welcome to perform some sort of text analysis of you want to know what language of text the user has entered.) (欢迎您进行某种文本分析,以了解用户输入的文本语言。)

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

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