- This topic has 17 replies, 3 voices, and was last updated 10 years ago by Halle Winkler.
-
AuthorPosts
-
February 15, 2013 at 10:13 am #1015633HarrySParticipant
Hi,
First of all thanks for providing the OpenEars framework.
I use T2S to inform the user on special events during video recording. This means I have a video / audio capturing session active (AVFoundation) and want to issue some short texts when reaching certain locations. Problem is, every time I issue a message using say:withVoice:, the capturing session is stopped. The error I receive is “Recording Stopped”. Reason I can certainly think of is the Audio devices (actually output) are used / changed while the capturing session uses it as well (actually input) – which in turn makes iOS stop the capturing session.
Any idea on a work around? Does T2S maybe claim more privileges than necessary (particularly Audio input)? Is it possible to disable and audio input / mic access (I do not use speech recognition).
Thanks for your thoughts and insights.
– Harry
February 15, 2013 at 10:18 am #1015634Halle WinklerPolitepixWelcome,
Is T2S referring to OpenEars’ text to speech, or is that another framework you are also using?
February 15, 2013 at 10:20 am #1015635HarrySParticipantOh yes, certainly. It is a FlintController created during app startup, receiving the say:withVoice: message. So for T2S the simplest solution you can think of. I have the latest framework version installed.
– Harry
February 15, 2013 at 10:40 am #1015636Halle WinklerPolitepixGot it, OK. TTS is the conventional term (wanted to let you know so if you need to ask questions elsewhere folks will immediately know what it’s about). You’re correct, FliteController is reasserting a PlayAndRecord audio session and you’re right that it only needs playback if you have no use for speech recognition. What you can try is to change the audio session that AudioSessionManager asserts and then recompile the framework and see if it helps. You’ll make the change in AudioSessionManager.m. If you look around line 271 of that file you’ll see a commented-out list of audio session types, and you’ll basically want to do a search and replace for kAudioSessionCategory_PlayAndRecord, replacing it with the other audio session types you want to try as the audio session that FliteController reasserts before its playback. You could also comment out invocations to AudioSessionManager in the framework and see if it just does the right thing without any interaction with the audio session.
February 15, 2013 at 11:59 am #1015637HarrySParticipantThat did it, great! I just replaced kAudioSessionCategory_PlayAndRecord by kAudioSessionCategory_AmbientSound – which seems to be the least exclusive setting for TTS – and recompiled the framework. Worked immediately.
Thanks for the fast and qualified support!
– Harry
February 15, 2013 at 12:03 pm #1015638Halle WinklerPolitepixSuper, happy to hear it was so easy!
November 23, 2013 at 7:15 am #1018977pasupathiParticipantHi Thank you for your guide lines to solve this issue.i have other problem video files recorded video is freeze every single second i click that TTS call method at a time.i don’t know how to solve that in this case video is corrupted to upload to server video have some data but video is not played the duration show Zero.Please Help.
November 26, 2013 at 10:49 am #1018991pasupathiParticipantHi,
i need your help my video frame is freeze when i call TextToSpeech method call at a particular time and particular frame is freeze the output video show at a particular time when i call TTS method the frame is Still.How to solve this?
Thank you.
-Pasupathi.November 26, 2013 at 11:00 am #1018992Halle WinklerPolitepixWelcome pasupathi,
I’m sorry, this doesn’t sound like an OpenEars issue. Video playback during TTS isn’t designed to be supported by OpenEars and the programming problem being encountered is with the video and network API — the contribution of the TTS to it sounds like maybe it is blocking a thread you are also using for your other two operations, but there is no way of knowing based on the information being given.
November 26, 2013 at 1:39 pm #1018995pasupathiParticipantHi,
Thank you for your replay.if u know any other idea please refer me.
-PasupathiNovember 26, 2013 at 2:23 pm #1018997pasupathiParticipantHi Halle,
i am use this code to avoid freeze video During Call TTS method.
Now it is work only avoid total freezing Video,During the time i call TTS method in between frames are freeze my video otherwise good.AudioSessionManager *oeAudioSessionManager = (AudioSessionManager *) [AudioSessionManager sharedAudioSessionManager];
oeAudioSessionManager.soundMixing = YES;
[self.fliteController say:quesLab.text withVoice:self.slt];AudioSessionManager.m in this file, I just replaced kAudioSessionCategory_PlayAndRecord by kAudioSessionCategory_AmbientSound
[videoWriterInput markAsFinished]; method to avoid freezing session.
My Problem during calling TTS at a few seconds my video is freeze(like still Image)Thank you.
-Pasupathi.
November 26, 2013 at 2:28 pm #1018999Halle WinklerPolitepixYou can also try setting FliteController’s noAudioSessionOverrides to TRUE in order to completely turn off OpenEars’ audio session management. If your issue is related to the session type this might be helpful and it may not have any downsides for an app that doesn’t use any of the speech recognition capabilities of OpenEars.
November 26, 2013 at 2:48 pm #1019000pasupathiParticipantHi ,
Thank you for your fast replay.
self.fliteController.noAudioSessionOverrides=YES;
i think you say like this but i have doubt where i setting it.
AudioSessionManager *oeAudioSessionManager = (AudioSessionManager *) [AudioSessionManager sharedAudioSessionManager];
oeAudioSessionManager.soundMixing = YES;
self.fliteController.noAudioSessionOverrides=YES;
[self.fliteController say:quesLab.text withVoice:self.slt];That is correct or not?
-Pasupathi.
November 26, 2013 at 2:51 pm #1019001Halle WinklerPolitepixJust remove all of the usages of AudioSessionManager and set self.fliteController.noAudioSessionOverrides in your lazy allocation of fliteController so it is always set when an fliteController is allocated before any speech is attempted. I think that should do it.
November 26, 2013 at 3:01 pm #1019003pasupathiParticipantHi,
once again thank you, I am remove audio session only add self.fliteController.noAudioSessionOverrides it is freeze total video at first frame.
-Pasupathi.November 26, 2013 at 3:07 pm #1019005Halle WinklerPolitepixOK, then it probably isn’t an issue with FliteController, since FliteController’s only AV object is AVAudioPlayer if you aren’t using the AudioSessionManager and that shouldn’t be creating any issues for you. This is probably on the video/network side.
November 26, 2013 at 3:15 pm #1019006pasupathiParticipantHi,
oh ok thank you for your help.I don’t know total video work using AudioSessionManager *oeAudioSessionManager = (AudioSessionManager *) [AudioSessionManager sharedAudioSessionManager];
oeAudioSessionManager.soundMixing = YES;
but call filter controller say:withvoice call particular time freeze video.
Thank you.
-Pasupathi.November 26, 2013 at 3:18 pm #1019007Halle WinklerPolitepixOK, well I wish you good luck with your project and hope you can get it sorted out!
-
AuthorPosts
- You must be logged in to reply to this topic.