1

I can not figure out how to make use of the iSpeech API. I use TTS and the API actually speaks, but I would like to know how to get rid of the pop-up box that comes up when doing the Speech Synthesis, As I need other UI working while this is going on. I read online that you would need to use the REST API, but that is unsupported on mobile devices. I need a way to hide the dialog box. Any help would be nice.

virindh
  • 3,775
  • 3
  • 24
  • 49

1 Answers1

3

Here, you go. Use it at your own risk.

-(void) removeISpeechPopups
{
    NSArray *windows = [[UIApplication sharedApplication] windows];

    for (UIWindow *window in windows)
    {
        if ([NSStringFromClass([window class]) isEqualToString:@"ISPopupBackgroundView"])
        {
            // NOTE: Morally, I wouldn't do this. Simply for development, 
            // this is fine, but don't put this in a real application, 
            // as it takes away from iSpeech's revenue at the end of the day.
            [window setHidden:YES];
        }
    }
}
Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201