作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
对于我的文字转语音应用,我正在尝试翻译以下 Java 代码:
if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
myTTS = new TextToSpeech(this, this);
}
对于 Xamarin 和 C3,CHECK_VOICE_DATA_PASS 不可用,我看不到应该使用哪个常量。我还没有弄清楚这个变量的含义。
我如何做类似的事情?
最佳答案
似乎缺少那些整数 const
定义,但定义了基于字符串的定义(?),但快速检查 Android API 将其定义为值为 1 的 int,所以怎么样:
public const int CHECK_VOICE_DATA_PASS = 0x00000001;
public static final int CHECK_VOICE_DATA_PASS
Added in API level 4
Indicates success when checking the installation status of the resources used by the TextToSpeech engine with the ACTION_CHECK_TTS_DATA intent.
Constant Value: 1 (0x00000001)
关于c# - 如何在 C# 中使用 Xamarin 中的 CHECK_VOICE_DATA_PASS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35018015/
对于我的文字转语音应用,我正在尝试翻译以下 Java 代码: if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PA
我是一名优秀的程序员,十分优秀!