HarmonyOS 系统定位及语音服务能力?

HarmonyOS是否自带有地理定位能力,以及文字转语音,语音转文字的能力

阅读 507
1 个回答

1、获取当前位置信息文档

step1:获取位置权限

step2:getcurrentlocation接口是返回经纬度

https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-geolocationmanager-V5\#geolocationmanagergetcurrentlocation

step3:getaddressesfromlocation接口,根据经纬度获取地理位置文字信息,返回的信息有国家、省份,提供这两个值可以判断出是否是中国大陆https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-geolocationmanager-V5\#geolocationmanagergetaddressesfromlocation

2、文字转语音,相关文档如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/hms-ai-texttospeech-V5\#section53411946183318

语音转文字,相关文档如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/hms-ai-speechrecognizer-V5

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进