Introducing SaveThatWave!

SaveThatWave saves the detected speech from OpenEars as a WAV file. Since it is an OpenEars plugin, it naturally notifies you when a recording is complete, tells you its path, and lets you delete individual recordings or all of them at once.

Introduction, Installation and Support


SaveThatWave is a plugin for OpenEars® and RapidEars which adds the new ability to record WAV audio files from speech perceived by OEPocketsphinxController without blocking and to receive notifications of successful write-out of the audio file including the path of the recording. It also wraps up deleting one or all of the recorded files and includes the logic for handling suspending/resuming and recording.

If you need to keep the audio recording of speech from OpenEars or RapidEars, SaveThatWave lets you do so. This is helpful if you want to help the user make handsfree recordings of themselves or upload the speech to a cloud speech recognition service.

SaveThatWave can be purchased at the Politepix shop here and it's important to thoroughly evaluating the demo version before purchasing, which can be downloaded from this shop page. The installation and usage process is the same for both the demo and licensed version, but the demo times out after 3 minutes of use and can't be submitted to the App Store.

The best way to get started using SaveThatWave is to get a tutorial from the Politepix interactive tutorial tool. Steps for getting started and more in-depth documentation are also provided on this page.


How to install and use SaveThatWave:

SaveThatWave is a plugin for OpenEars, so it is added to an already-working OpenEars project in order to enable new OpenEars features. In these instructions we are using the OpenEars sample app as an example for adding the plugin and new features, but the steps are basically the same for any app that already has a working OpenEars installation. Please note that SaveThatWave requires OpenEars 2.5 or greater and RapidEars 2.5 or greater if you are using it with RapidEars.

Download and try out the OpenEars distribution and try the OpenEars sample app out. SaveThatWave is a plug-in for OpenEars that is added to an OpenEars project so you first need a known-working OpenEars app to work with. The OpenEars sample app is fine for this to get started. You can also get a complete tutorial on both creating an OpenEars app and adding SaveThatWave to it using the automatic customized tutorial.

Open up the OpenEars Sample App in Xcode. Drag your downloaded SaveThatWaveDemo.framework into the OpenEars sample app project file navigator.

Open up the Build Settings tab of your app or OpenEarsSampleApp and find the entry "Other Linker Flags" and add the linker flag "-ObjC". Do this for debug and release builds. More explanation of this step can be seen in the tutorial by selecting the "saving audio files" tutorial option, which will also show exactly how to use the new methods added by SaveThatWave.

Next, navigate to Xcode's Build Settings for your target and find the setting "Framework Search Paths".

If adding the framework in previous step did not automatically add it to "Framework Search Paths", add it manually. You can find the path by going into the Project Navigator (the main Xcode project file view), finding and then selecting your just-added SaveThatWaveDemo.framework, and typing ⌘⌥-1 to open the File Inspector for it (it may already be open – it is the narrow window pane on the far right of the main Xcode interface). The full path to your added framework is shown under "Identity and Type"->"Full Path". The "Framework Search Path" is this path minus the last path element, so if it says /Users/you/Documents/YourApp/Resources/Framework/SaveThatWaveDemo.framework, the path to add to "Framework Search Paths" is /Users/yourname/Documents/YourApp/Resources/Framework/ and you should keep the "Recursive" checkbox unchecked.

While we're here, take a moment to look at your Framework Search Paths build setting and verify that it doesn't contain any peculiar entries (for instance, entries with many extra quotes and/or backslashed quote marks) and that each search path is on its own line and hasn't been concatenated to another entry, and that the setting isn't pointing to old versions of the frameworks you're installing that are in other locations.

Please note that SaveThatWave has to be instantiated as a property of any class it is added to, or it won't work.


The demo version of SaveThatWave doesn't come with free private email support, but you can ask as many questions on the OpenEars plugins forums as you like in accordance with its conduct rules, if you have used real information to register your demo.

Once you have completed licensing of the framework for your app, you get more email support incidents if you have purchased an email support bundle, and continued forum support. Extra email support incidents for demo and licensed versions can always be purchased at the Politepix shop. Support contracts for multiple email support incidents with Politepix can also be purchased. Licensing the framework requires giving the exact application name that the framework will be linked to, so don't purchase the license until you know the app name. Please read on for the SaveThatWave documentation.


OEEventsObserver+SaveThatWave Category Reference

Detailed Description

This plugin returns the status of the process of saving a WAV file from perceived speech in OEPocketsphinxController.

Usage examples

What to add to your implementation:

At the top of your header after the line
#import <OpenEars/OEEventsObserver.h>
Add the line
#import <SaveThatWaveDemo/OEEventsObserver+SaveThatWave.h>
And after this OEEventsObserver delegate method you added to your implementation when setting up your OpenEars app:
- (void) testRecognitionCompleted {
	NSLog(@"A test file that was submitted for recognition is now complete.");
Just add the following extended delegate method:
- (void) wavWasSavedAtLocation:(NSString *)location {
    NSLog(@"WAV was saved at the path %@", location);
It is a requirement that any OEEventsObserver you use in a view controller or other object is a property of that object, or it won't work.

Method Documentation

- (void) wavWasSavedAtLocation:(NSString *) location

A WAV file was saved to the caches folder at the path indicated by the NSString location. Swift 3: wavWasSaved(atLocation location: String!)


SaveThatWaveController Class Reference

Detailed Description

This plugin saves a WAV file from perceived speech in OEPocketsphinxController.

Usage examples

What to add to your implementation:

Add the following to your implementation (the .m file):Under the @implementation keyword at the top, add this line:
@synthesize saveThatWaveController;
Before you start performing speech recognition, perhaps in your viewDidLoad method, instantiate the SaveThatWaveController property:
self.saveThatWaveController = [[SaveThatWaveController alloc] init];
Then, after this line for OpenEars:
[[OEPocketsphinxController sharedInstance] startListeningWithLanguageModelAtPath:lmPath dictionaryAtPath:dicPath acousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"] languageModelIsJSGF:NO];
or this line for RapidEars:
[[OEPocketsphinxController sharedInstance] startRealtimeListeningWithLanguageModelAtPath:lmPath dictionaryAtPath:dicPath acousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"];
You can add the line:
[self.saveThatWaveController start]; // For saving WAVs from OpenEars or RapidEars
It is a requirement that any SaveThatWaveController you use in a view controller or other object is a property of that object, or it won't work.

Method Documentation

- (NSError *) deleteAudioFile:(NSString *) audioFileToDelete

Delete a specific audio file by giving its NSString path as audioFileToDelete. Swift 3: saveThatWave.deleteAudioFile(audioFileToDelete: String!)

- (NSError *) deleteAllAudioFiles

Delete all SaveThatWave audio files that are in the Caches directory. Swift 3: saveThatWave.deleteAllAudioFiles()

- (void) start

Start SaveThatWave saving audio recordings to the Caches folder. Swift 3: savethatWave.start()

- (void) stop

Stop SaveThatWave saving audio recordings to the Caches folder. Swift 3: savethatWave.stop()

- (void) startSessionDebugRecord

This can be used to collect all audio from the listening loop as a WAV for bug replication purposes. If a session exits abnormally, you will find a debug recording in your caches directory on next launch. Swift 3: savethatWave.startSessionDebugRecord()


Demo is identical to licensed version, but times out after a few minutes. Changelog »

Download SaveThatWave Demo
Go to the quickstart tutorial Buy SaveThatWave

OpenEars™ Plugins


RapidEars is a paid plugin for OpenEars™ that lets you perform live recognition on in-progress speech for times that you can't wait for the user to pause! Try out the RapidEars demo free of charge.


Rejecto is a paid plugin for OpenEars™ that improves accuracy and UX by letting OpenEars™ ignore utterances of words that aren't in its vocabulary. Try out the Rejecto demo free of charge.


Did you know that the free version of OpenEars™ can perform recognition of fixed phrases using rules-based grammars? And RuleORama is a paid plugin that lets you use the same grammar format as stock OpenEars™, but the grammars are fast enough to work with RapidEars. Try out the RuleORama demo free of charge.


NeatSpeech is a plugin for OpenEars™ that lets it do fast, high-quality offline speech synthesis which is compatible with iOS6.1, and even lets you edit the pronunciations of words! Try out the NeatSpeech demo free of charge.

Learn more about the OpenEars™ Plugin Platform


Help with OpenEars™

There is free public support for OpenEars™ in the OpenEars Forums, and you can also purchase private email support at the Politepix Shop. Most OpenEars™ questions are answered in the OpenEars support FAQ.