Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2024-11-30 16:24:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-11-30 16:24:22 +0800
Commit
a3d6e1acc7e65d2bc9eda56d5548eeff295e9349
a3d6e1ac
1 parent
c9d3b6cd
Fix getting microphone permission for HarmonyOS VAD+ASR example (#1582)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
7 行增加
和
1 行删除
harmony-os/SherpaOnnxVadAsr/entry/src/main/ets/pages/Index.ets
harmony-os/SherpaOnnxVadAsr/entry/src/main/ets/pages/Index.ets
查看文件 @
a3d6e1a
...
...
@@ -46,8 +46,14 @@ struct Index {
const permissions: Permissions[] = ["ohos.permission.MICROPHONE"];
let allowed: boolean = await allAllowed(permissions);
if (!allowed) {
requestPermissions(permissions);
console.log("request to access the microphone");
const status: boolean = await requestPermissions(permissions);
if (!status) {
console.error('access to microphone is denied')
this.resultForMic = "Failed to get microphone permission. Please retry";
return;
}
allowed = await allAllowed(permissions);
if (!allowed) {
...
...
请
注册
或
登录
后发表评论