gpt4 book ai didi

c# - 如何在 C# 中使用 Xamarin 中的 CHECK_VOICE_DATA_PASS?

转载 作者:行者123 更新时间:2023-11-30 01:36:40 26 4
gpt4 key购买 nike

对于我的文字转语音应用,我正在尝试翻译以下 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com