hookshy Well-Known Member Licensed User Longtime User Aug 30, 2014 #1 Using the streamer object to record audio on some devices makes the voice recognitions unavaillable ... after pressing a button that raise vr.listen action then an audio problem is raised by google voice recognition window I have tried initialising streamer with initialize2 method in activity_create with audiosource 0,1,,2,3 but I could not solved the problem What's the problem ? ... Code: 'streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) streamer.Initialize2(1,"streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC)
Using the streamer object to record audio on some devices makes the voice recognitions unavaillable ... after pressing a button that raise vr.listen action then an audio problem is raised by google voice recognition window I have tried initialising streamer with initialize2 method in activity_create with audiosource 0,1,,2,3 but I could not solved the problem What's the problem ? ... Code: 'streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) streamer.Initialize2(1,"streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC)
Erel B4X founder Staff member Licensed User Longtime User Aug 31, 2014 #2 Are you recording audio when you call vr.listen? Please check the unfiltered logs and post the error message. Upvote 0
Are you recording audio when you call vr.listen? Please check the unfiltered logs and post the error message.
hookshy Well-Known Member Licensed User Longtime User Aug 31, 2014 #3 No that is the problem the recorder is stopped ...I only initialize the streamer...in the activity create so I could record later on The app works great on other devices with vr and streamer ... both initialised in activity create Nothing special in the unfiltered logs .... As soon as I start the app without streamer initialisation the audio problem on vr window is gone Upvote 0
No that is the problem the recorder is stopped ...I only initialize the streamer...in the activity create so I could record later on The app works great on other devices with vr and streamer ... both initialised in activity create Nothing special in the unfiltered logs .... As soon as I start the app without streamer initialisation the audio problem on vr window is gone
Erel B4X founder Staff member Licensed User Longtime User Aug 31, 2014 #4 You can try to release the internal AudioTrack object before you start the VR: Code: Dim r As Reflector r.Target = AudioStreamer1 r.Target = r.GetField("track") r.RunMethod("release") If it doesn't work then try to also release audioRecord (same code with audioRecord instead of track). You will need to initialize the streamer again. Upvote 0
You can try to release the internal AudioTrack object before you start the VR: Code: Dim r As Reflector r.Target = AudioStreamer1 r.Target = r.GetField("track") r.RunMethod("release") If it doesn't work then try to also release audioRecord (same code with audioRecord instead of track). You will need to initialize the streamer again.
hookshy Well-Known Member Licensed User Longtime User Aug 31, 2014 #5 Thanks Erel ! I have solved the problem by initialising the streamer only when needed generaly before start recording and releasing when is no longer needed with the above code! Note: that if you want to record again the release method must not be used in the same sub with initialization as the streamer may fail to work...I guess the release needs some time . Upvote 0
Thanks Erel ! I have solved the problem by initialising the streamer only when needed generaly before start recording and releasing when is no longer needed with the above code! Note: that if you want to record again the release method must not be used in the same sub with initialization as the streamer may fail to work...I guess the release needs some time .