Skip to content

Commit d1ae4ae

Browse files
committed
fix: simplify iOS microphone permission handling in Vosk plugin
1 parent 5b51fe3 commit d1ae4ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

plugin/withVosk.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ const withVosk = (config, props = {}) => {
3434
if (iOSMicrophonePermission) {
3535
withInfoPlist(config, (configMod) => {
3636
configMod.modResults.NSMicrophoneUsageDescription =
37-
iOSMicrophonePermission ||
38-
configMod.modResults.NSMicrophoneUsageDescription ||
39-
'Microphone access is required for speech recognition';
37+
iOSMicrophonePermission;
4038
return configMod;
4139
});
4240
}

plugin/withVosk.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ const withVosk: ConfigPlugin<VoskPluginProps> = (
2222
if (iOSMicrophonePermission) {
2323
withInfoPlist(config, (configMod) => {
2424
configMod.modResults.NSMicrophoneUsageDescription =
25-
iOSMicrophonePermission ||
26-
configMod.modResults.NSMicrophoneUsageDescription ||
27-
'Microphone access is required for speech recognition';
25+
iOSMicrophonePermission;
2826
return configMod;
2927
});
3028
}

0 commit comments

Comments
 (0)