推荐下载Android实例.docx

上传人:b****5 文档编号:2874220 上传时间:2022-11-16 格式:DOCX 页数:18 大小:21.75KB
下载 相关 举报
推荐下载Android实例.docx_第1页
第1页 / 共18页
推荐下载Android实例.docx_第2页
第2页 / 共18页
推荐下载Android实例.docx_第3页
第3页 / 共18页
推荐下载Android实例.docx_第4页
第4页 / 共18页
推荐下载Android实例.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

推荐下载Android实例.docx

《推荐下载Android实例.docx》由会员分享,可在线阅读,更多相关《推荐下载Android实例.docx(18页珍藏版)》请在冰豆网上搜索。

推荐下载Android实例.docx

推荐下载Android实例

Android实例

2015/07/090相关资料:

 注意:

在手机上必须选安装文字转语音引擎“googleTextToSpeech”地址:

shouji56/soft/GoogleWenZiZhuanYuYinYinQingGoogleTexttoSpeech_3864/

 结果总结:

 XE10.1+小米手机5=通过测试首先手机上必须安装语音包:

1.“googleTextTo

Speech”(不知为什么我的只发英文)2.“度秘语音引擎3.0”(中英都可以发音)3.“科大讯

飞语音引擎3.0”(中英都可以发音)4.APK发音使用的是当前语音包5.小米手机5-设

置-更多设置-语言和输入法-文字转语音(TTS)输出

 1.新建一个单元Androidapi.JNI.TTS

 1{*******************************************************}2{}3{

CodeGearDelphiRuntimeLibrary}4{Copyright(c)2013JeffOvercash}5{}6

{*******************************************************}8{Delphi

trnslationforTTSAndroidJavaclassesfrom}9{

developer.android/reference/android/speech/tts/package-summary.html}11unit

Androidapi.JNI.TTS;1213interface15usesAndroidapi.JNIBridge,16

Androidapi.JNI.JavaTypes,17Androidapi.JNI.Os,18Androidapi.JNI.App,19

Androidapi.JNI.GraphicsContentViewText;2021type23{Forwarddeclarations}24

JSynthesisCallback=interface;//android.speech.tts.SynthesisCallback25

JSynthesisRequest=interface;//android.speech.tts.SynthesisRequest26JTextToSpeech=

interface;//android.speech.tts.TextToSpeech27JTextToSpeech_Engine=interface;//

android.speech.tts.TextToSpeech$Engine28JTextToSpeech_EngineInfo=interface;

//android.speech.tts.TextToSpeech$EngineInfo29JTextToSpeech_OnInitListener=

interface;//android.speech.tts.TextToSpeech$OnInitListener30

JTextToSpeech_OnUtteranceCompletedListener=interface;//

android.speech.tts.TextToSpeech$OnUtteranceCompletedListener31

JTextToSpeechService=interface;//android.speech.tts.TextToSpeechService32

JUtteranceProgressListener=interface;//android.speech.tts.UtteranceProgressListener34

JSynthesisCallbackClass=interface(IJavaClass)35[‘{3B30766E-A43B-4005-BE92-

472CD075F325}’]36end;3738

[JavaSignature(‘android/speech/tts/SynthesisCallback’)]39JSynthesisCallback=

interface(IJavaInstance)40[‘{190C13DE-BC7E-44CE-94F6-4AF1A84A4612}’]41

functionaudioAvailable(buffer:

TJavaArraybyteoffset:

Integer;length:

Integer):

Integer;

cdecl;42functiondone:

Integer;cdecl;43procedureerror;cdecl;44function

getMaxBufferSize:

Integer;cdecl;45functionstart(sampleRateInHz:

Integer;

audioFormat:

Integer;channelCount:

Integer):

Integer;cdecl;46end;47

TJSynthesisCallback=class(TJavaGenericImportJSynthesisCallbackClass,

JSynthesisCallback)end;4849JSynthesisRequestClass=interface(JObjectClass)50

[‘{AE41459D-42C6-4E66-B174-F6FA5216A1DA}’]51{Method}52functioninit(text:

JString;params:

JBundle):

JSynthesisRequest;53end;5455

[JavaSignature(‘android/speech/tts/SynthesisRequest’)]56JSynthesisRequest=

interface(JObject)57[‘{1963DAD8-C58F-4868-BF8A-B43AE7A14145}’]58function

getCountry:

JString;cdecl;59functiongetLanguage:

JString;cdecl;60function

getParams:

JBundle;cdecl;61functiongetPitch:

Integer;cdecl;62function

getSpeechRate:

Integer;cdecl;63functiongetText:

JString;cdecl;64functiongetVariant:

JString;cdecl;65end;66TJSynthesisRequest=class(TJavaGenericImport

JSynthesisRequestClass,JSynthesisRequest)end;6768JTextToSpeechClass=

interface(JObjectClass)69[‘{0E2C5E49-95BE-4F19-BCCD-21960D03E957}’]70{

PropertyMethods}71function

_GetACTION_TTS_QUEUE_PROCESSING_COMPLETED:

JString;72function

_GetERROR:

Integer;73function_GetLANG_AVAILABLE:

Integer;74function

_GetLANG_COUNTRY_AVAILABLE:

Integer;75function

_GetLANG_COUNTRY_VAR_AVAILABLE:

Integer;76function

_GetLANG_MISSING_DATA:

Integer;77function_GetLANG_NOT_SUPPORTED:

Integer;78function_GetQUEUE_ADD:

Integer;79function_GetQUEUE_FLUSH:

Integer;80function_GetSUCCESS:

Integer;81{Methods}82functioninit(contect:

JContext;listener:

JTextToSpeech_OnInitListener):

JTextToSpeech;cdecl;overload;83

functioninit(context:

JContext;listener:

JTextToSpeech_OnInitListener;engine:

JString):

JTextToSpeech;overload;84{Properties}85property

ACTION_TTS_QUEUE_PROCESSING_COMPLETED:

JStringread

_GetACTION_TTS_QUEUE_PROCESSING_COMPLETED;86propertyERROR:

Integerread_GetERROR;87propertyLANG_AVAILABLE:

Integerread

_GetLANG_AVAILABLE;88propertyLANG_COUNTRY_AVAILABLE:

Integerread

_GetLANG_COUNTRY_AVAILABLE;89property

LANG_COUNTRY_VAR_AVAILABLE:

Integerread

_GetLANG_COUNTRY_VAR_AVAILABLE;90propertyLANG_MISSING_DATA:

Integerread_GetLANG_MISSING_DATA;91propertyLANG_NOT_SUPPORTED:

Integerread_GetLANG_NOT_SUPPORTED;92propertyQUEUE_ADD:

Integerread

_GetQUEUE_ADD;93propertyQUEUE_FLUSH:

Integerread_GetQUEUE_FLUSH;

94propertySUCCESS:

Integerread_GetSUCCESS;95end;9697

[JavaSignature(‘android/speech/tts/TextToSpeech’)]98JTextToSpeech=

interface(JObject)99[‘{E1D06364-F967-4381-B178-EEDD42C203C7}’]100function

addEarcon(earcon:

JString;filename:

JString):

Integer;cdecl;overload;101function

addEarcon(earcon:

JString;packagename:

JString;resourceID:

I

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1