Skip to content

v3.0.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 22:34
· 20 commits to main since this release
1ef7a00

Patch Changes

  • 7a64d6e: (iOS) Allow passing through folder URIs for audio persistence.

    You can now do the following on Android and iOS:

    import { ExpoSpeechRecognitionModule } from "expo-speech-recognition";
    import { Directory, Paths } from "expo-file-system";
    
    const outputDirectory = new Directory(Paths.join(Paths.cache, "recordings"));
    
    // Create the folder, if it doesn't exist yet (Android does not yet create intermediates)
    outputDirectory.create({ intermediates: true, idempotent: true });
    
    // Start speech recognition with a custom directory
    ExpoSpeechRecognitionModule.start({
      lang: "en-US",
      recordingOptions: {
        persist: true,
        // e.g. "file:///data/user/0/com.yourapp.app/cache/recordings/"
        outputDirectory: outputDirectory.uri,
      },
    });