Share via

speech SDK for ios

51155945 0 Reputation points
2025-09-11T05:15:06.87+00:00

When initiating voice translation on iOS, sometimes this error appears: Exception caught in core: Exception with an error code: 0x15 (SPXERR_MIC_ERROR)

[CALL STACK BEGIN]

3 MicrosoftCognitiveServicesSpeech 0x0000000103da4b20 GetModuleObject + 1705932

4 MicrosoftCognitiveServicesSpeech 0x0000000103cfb180 GetModuleObject + 1011244

5 MicrosoftCognitiveServicesSpeech 0x0000000103d0d31c GetModuleObject + 1085384

6 MicrosoftCognitiveServicesSpeech 0x0000000103d06348 GetModuleObject + 1056756

7 MicrosoftCognitiveServicesSpeech 0x0000000103d059dc GetModuleObject + 1054344

8 MicrosoftCognitiveServicesSpeech 0x0000000103d0283c GetModuleObject + 1041640

9 MicrosoftCognitiveServicesSpeech 0x0000000103cca898 GetModuleObject + 812356

10 MicrosoftCognitiveServicesSpeech 0x0000000103cc7478 GetModuleObject + 799012

11 MicrosoftCognitiveServicesSpeech 0x0000000103c13e84 GetModuleObject + 64304

12 MicrosoftCognitiveServicesSpeech 0x0000000103c114c4 GetModuleObject + 53616

13 MicrosoftCognitiveServicesSpeech 0x0000000103c3486c GetModuleObject + 197912

14 MicrosoftCognitiveServicesSpeech 0x0000000103e2697c GetModuleObject + 2237992

15 MicrosoftCognitiveServicesSpeech 0x0000000103d576a0 GetModuleObject + 1389388

16 MicrosoftCognitiveServicesSpeech 0x0000000103d59440 GetModuleObject + 1396972

17 MicrosoftCognitiveServicesSpeech 0x0000000103d57778 GetModuleObject + 1389604

18 MicrosoftCognitiveServicesSpeech 0x0000000103d5a5b4 GetModuleObject + 1401440

19 libsystem_pthread.dylib 0x00000002207a7344 _pthread_start + 136

[CALL STACK END]

Azure Speech in Foundry Tools

1 answer

Sort by: Most helpful
  1. Pavankumar Purilla 11,575 Reputation points Microsoft External Staff Moderator
    2025-09-11T09:00:16.16+00:00

    Hi 凯旋 李,
    It seems like you are encountering an issue with the Speech SDK on iOS where the error 0x15 (SPXERR_MIC_ERROR) appears when initiating voice translation. This error generally indicates that the application is unable to access the device’s microphone. On iOS, microphone access is controlled by the operating system, and if the app has not been granted permission or if another application is currently using the microphone, the Speech SDK will fail to start and report this error. It can also occur if the audio session is not properly initialized or activated before starting speech recognition.

    To resolve this issue, first make sure that your app has the correct microphone permissions configured. This requires adding the NSMicrophoneUsageDescription key in your app’s Info.plist file with a message that clearly explains why microphone access is needed. If this key is missing, the operating system will block access to the microphone entirely. Also ensure that the microphone is not already in use by other apps or background processes at the time you start recognition, as simultaneous access conflicts can lead to the same error.

    It is also recommended to implement error handling logic to catch cases where the microphone cannot be accessed. This allows your application to respond gracefully, for example by notifying the user and retrying initialization once the microphone becomes available again. Additionally, confirm that the Speech SDK is being initialized correctly according to the documentation, and that your AVAudioSession is configured with an appropriate category such as PlayAndRecord or Record and is activated before beginning speech recognition. Proper configuration of the audio session ensures that the SDK has exclusive access to the microphone when it starts recording.

    By verifying microphone permissions, ensuring exclusive microphone access, handling initialization errors, and following the correct Speech SDK setup steps, you can significantly reduce or eliminate the occurrence of the SPXERR_MIC_ERROR when using voice translation on iOS.
    For more information:
    iOS use cases
    Quickstart: Install the Speech SDK for Objective-C
    SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND

    Reference threads:
    [https://learn.microsoft.com/en-us/answers/questions/2125092/how-to-fix-exception-with-an-error-code-0x15-(spxe](https://learn.microsoft.com/en-us/answers/questions/2125092/how-to-fix-exception-with-an-error-code-0x15-(spxe)
    https://learn.microsoft.com/en-us/answers/questions/848838/unity-with-azure-speech-sdk-for-android-and-ios

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.