JosephMillsAtWork / voicetogoog

Automatically exported from code.google.com/p/voicetogoog
1 stars 0 forks source link

can't record on BlackBerry 10 devalpha B #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Click record
2. doesn't record
3. No transcription

What is the expected output? What do you see instead?
It works like on Linux or Harmattan

Please provide any additional information below.

At least issue report feature works...

Original issue reported on code.google.com by NielsMa...@gmail.com on 23 Dec 2012 at 1:06

GoogleCodeExporter commented 8 years ago

Problem: audio recorder gets error at setup time:

Dec 22 23:59:51.159 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  defaultServiceProvider::requestService(): no service found for 
- "com.nokia.qt.audiosource" 

[00:27] <npm> how does one go about recording audio with QMediaRecorder() (like 
http://www.qt.gitorious.org/qt-mobility/qt-mobility/blobs/master/examples/audior
ecorder/audiorecorder.cpp )
[00:27] <npm> I get errors like
[00:27] <npm> com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410   
           default   9000  defaultServiceProvider::requestService(): no service 
found for - "com.nokia.qt.audiosource"
[00:39] <npm> Q_MEDIASERVICE_AUDIOSOURCE is set to "com.nokia.qt.audiosource" 
in 
http://www.qt.gitorious.org/qt-mobility/qt-mobility/blobs/f7071081b7a83e42033df5
7d17593c3fd3e70608/src/multimedia/qmediaserviceprovider.h
[00:39] <npm> ...

so how to setup /usr/lib/qt4/plugins/mediaservice/libqtmedia_blackberry.so

[01:06] <npm> in other words the service plugin points to nonexistant 
com.nokia.qt.audiosource when there seems to be a blackberry mediaservice 
plugin that isn't being invoked

Original comment by NielsMa...@gmail.com on 23 Dec 2012 at 9:14

GoogleCodeExporter commented 8 years ago
$ slog2info -l 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410|less 
buffer_set_name=com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d, 
num_buffers=1
  buffer_name=default
Dec 22 23:59:51.138 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default*  9000  "QDeclarativeDebugServer: Ignoring "-qmljsdebugger=port:3768". 
Debugging has not been enabled." 
Dec 22 23:59:51.159 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  defaultServiceProvider::requestService(): no service found for 
- "com.nokia.qt.audiosource" 
Dec 22 23:59:51.212 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  QGeoPositionInfo(QDateTime("Sun Dec 23 07:47:33 2012") , 
QGeoCoordinate(33.6, -117.87), MagneticVariation=12.2896, HorizontalAccuracy=60)
Dec 22 23:59:51.245 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  DEBUG: using BlackBerry10 UX 
Dec 22 23:59:51.535 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::isRecording()==false; state= 
QMediaRecorder::StoppedState 
Dec 22 23:59:51.536 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::isPaused()==false; state= 
QMediaRecorder::StoppedState 
Dec 22 23:59:51.536 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  handleGoingOffline(): went offline and not recording... calling 
panicReset()
Dec
...
Dec 22 23:59:54.797 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  DEBUG: populateUtterListModel() loading...
Dec 22 23:59:54.824 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  DEBUG: populateUtterListModel() loaded 0 entries.
Dec 22 23:59:57.952 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  calling Recorder.beginRecording()...
Dec 22 23:59:57.952 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::isStopped()==true; state= 
QMediaRecorder::StoppedState 
Dec 22 23:59:57.956 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  GPXLogger.updateIntervalChanged(0);
Dec 22 23:59:57.960 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  preventScreenBlank() -- enabling.
Dec 22 23:59:57.960 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  
file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895
b46d/app/native/qml/voicetogoog/VoiceToGoog.qml:572:5: QML 
QDeclarativeAudio_QML_19: Binding loop detected for property 
"noScreenBlanking"o_QML_19: Binding loop detected for property 
"noScreenBlanking"        default   9000  GPXLogger.updateIntervalChanged(0);
Dec 22 23:59:57.968 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::startRecord(): captureFile=  QUrl( 
"/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/d
ata/voicetogoog_0010" )  
Dec 22 23:59:57.968 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::beginRecording(): calling 
setAudioInput('default') special-case for BlackBerry platform, using default. 
Dec 22 23:59:57.969 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  Success: starting recording 
captureFile=/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoo
g4895b46d/data/voicetogoog_0010 ...
Dec 23 00:00:23.555 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  DEBUG: cancelRecording() -- calling Recorder.endRecording()...
Dec 23 00:00:23.556 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  AudioRecorder::endRecording():  QMediaRecorder::StoppedState 
Dec 23 00:00:23.556 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  DEBUG: cancelRecording() -- calling 
Controller.touchFile(/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_v
oicetogoog4895b46d/data/voicetogoog_0010) to truncate...
Dec 23 00:00:23.558 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  Controller.alert(): File(s) touched on device
Dec 23 00:00:23.559 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  preventScreenBlank() -- disabling.
Dec 23 00:00:23.560 
com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410              
default   9000  
file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895
b46d/app/native/qml/voicetogoog/VoiceToGoog.qml:572:5: QML 
QDeclarativeAudio_QML_19: Binding loop detected for property 
"noScreenBlanking"om.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d.13492410
              default   9000  Controller.alert(): File(s) touched on device

Original comment by NielsMa...@gmail.com on 23 Dec 2012 at 9:21

GoogleCodeExporter commented 8 years ago
Noticing in 
http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.mme.mmrend
erer/topic/recording_audio.html

          // specify the audio device under /dev/snd you want to 
          // use for the recording, and the recording details 
          // (in this case, we use a sampling rate of 8000 Hz and 
          // 1 channel for mono (not stereo) recording)
          input = mmr_input_attach( context,
                  "snd:/dev/snd/pcmPreferredc?nchan=1&frate=8000",
                                   "track" );

http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.neutrino.a
udio/topic/architecture_cardsdevices.html suggests:

 $ ls /dev/snd
 bluetoothc         headsetp           pcmC0D3p           pcmPreferredp
 bluetoothp         lineoutp           pcmC0D4c           speakerp
 btscoc             loggerc            pcmC0D4p           tonesp
 btscop             masterc            pcmC0D5c           ttyc
 controlC0          masterp            pcmC0D5p           ttyp
 defaultc           mixerC0D0          pcmC0D6c           voice_abec
 defaultp           modem_mcbspc       pcmC0D6p           voice_abep
 echoc              modem_mcbspp       pcmC0D7c           voicec
 handsetc           pcmC0D0c           pcmC0D8c           voicep
 handsetp           pcmC0D0p           pcmC0D8p
 headphonep         pcmC0D1p           pcmC0D9c
 headsetc           pcmC0D2p           pcmPreferredc

But of course setting 

 #ifdef Q_OS_BLACKBERRY
    //QAudioDeviceInfo::defaultInputDevice().deviceName() gives a ""
    //defaultInputDevice
    // Trying setAudioInput value suggested by
    // http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.mme.mmrenderer/topic/recording_audio.html
    // input = mmr_input_attach( context, "snd:/dev/snd/pcmPreferredc?nchan=1&frate=8000", "track" );
    qDebug() << "AudioRecorder::beginRecording(): wishfully thinking that 'snd:/dev/snd/pcmPreferredc?nchan=1&frate=16000') is appropriate special-case for BlackBerry platform.";
    recordingSource->setAudioInput("snd:/dev/snd/pcmPreferredc?nchan=1&frate=16000");
#else
    qDebug() << "AudioRecorder::beginRecording(): using input: " << QAudioDeviceInfo::defaultInputDevice().deviceName();
    recordingSource->setAudioInput(QAudioDeviceInfo::defaultInputDevice().deviceName());   //http://doc.qt.nokia.com/4.7/qaudiodeviceinfo.html
    //      recordingSource->setAudioInput("alsa:default");
    //      recordingSource->setAudioInput("pulseaudio:");
 #endif

Doesn't get rid of the  old: (and why would it?)

"defaultServiceProvider::requestService(): no service found for - 
"com.nokia.qt.audiosource" "

Full log of a brief run/record/reset (longtouch recordbutton)/quit session:

 "QDeclarativeDebugServer: Ignoring "-qmljsdebugger=port:3768". Debugging has not been enabled." 
 defaultServiceProvider::requestService(): no service found for - "com.nokia.qt.audiosource" 
 QGeoPositionInfo(QDateTime("Tue Dec 25 18:20:22 2012") , QGeoCoordinate(33.6001, -117.871), MagneticVariation=12.2892, HorizontalAccuracy=60)
 DEBUG: using BlackBerry10 UX 
 AudioRecorder::isRecording()==false; state= QMediaRecorder::StoppedState 
 AudioRecorder::isPaused()==false; state= QMediaRecorder::StoppedState 
 handleGoingOffline(): went offline and not recording... calling panicReset()
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/VoiceToGoogBB.qml:533:5: QML MenuModel: set: index -1 out of range
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/VoiceToGoogBB.qml:533:5: QML MenuModel: set: index -1 out of range
 window.resetState() -- application has been forced back to initialization state.
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/main_blackberry.qml:33:1: QML VoiceToGoogBB: Binding loop detected for property "appOffline"
 <Unknown File>: QML StateGroup: Can't apply a state change as part of a state definition.
 Unsupported query type: 100
 Unsupported query type: 0
 Server is listening on port 4567
 DEBUG: VoiceToGoog window.width=0; window.height=0; desktop.width=768; desktop.height=1280; $HOME=/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/data; offlineStoragePath=/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/data; isSymbian=false; isHarmattan=false; isMaemo=false; isMeegoTablet=true; isOnline=false; application=voicetogoog; version=0.4.0; organization=NielsMayer; domain=NielsMayer.com; lang=en_US; region=Null
 DEBUG: loaded RegionNull...
 DEBUG: RegionNull.doOverrides() called -- nothing done.
 GPXLogger.updateIntervalChanged(10000);
 Logging Started 
 GPXLogger.numberOfPositionsReceivedChanged(0);
 GPXLogger.loggingChanged(true);
 DEBUG: GPXLogger.numberOfPositionsReceived()=0
 DEBUG: main_blackberry onCompleted mainPage.width=768 mainPage.height=1280
 SpeechLangModel#onCompleted(): system language 'en_US' --> 'en-US'
 handleGoingOffline(): still offline ...
 Controller::notifyOnlineStateChanged() is_online =  true 
 handleGoingOffline(): went back online ...
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/main_blackberry.qml:33:1: QML VoiceToGoogBB: Binding loop detected for property "appOffline"
 Splash Screen finished. Starting load of database...
 DEBUG: populateUtterListModel() loading...
 DEBUG: populateUtterListModel() loaded 0 entries.
 calling Recorder.beginRecording()...
 AudioRecorder::isStopped()==true; state= QMediaRecorder::StoppedState 
 GPXLogger.updateIntervalChanged(0);
 preventScreenBlank() -- enabling.
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/VoiceToGoogBB.qml:572:5: QML QDeclarativeAudio_QML_19: Binding loop detected for property "noScreenBlanking"
 AudioRecorder::startRecord(): captureFile=  QUrl( "/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/data/voicetogoog_0018" )  
 AudioRecorder::beginRecording(): wishfully thinking that 'snd:/dev/snd/pcmPreferredc?nchan=1&frate=16000') is appropriate special-case for BlackBerry platform. 
 Success: starting recording captureFile=/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/data/voicetogoog_0018 ...
 DEBUG: cancelRecording() -- calling Recorder.endRecording()...
 AudioRecorder::endRecording():  QMediaRecorder::StoppedState 
 DEBUG: cancelRecording() -- calling Controller.touchFile(/accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/data/voicetogoog_0018) to truncate...
 Controller.alert(): File(s) touched on device
 preventScreenBlank() -- disabling.
 file:///accounts/1000/appdata/com.nielsmayer.voicetogoog.testDev_voicetogoog4895b46d/app/native/qml/voicetogoog/VoiceToGoogBB.qml:572:5: QML QDeclarativeAudio_QML_19: Binding loop detected for property "noScreenBlanking"
 voicetogoogExternalIssueReport(): opening external issue tracker at http://code.google.com/p/voicetogoog/issues/entry?template=Feature%20Request .
 Logging Stopped 
 GPXLogger.loggingChanged(false);
 Server is going away. 

And, yes, by "Server is going away" the embedded webserver part of the app 
works, just has no data to display :-(

Original comment by NielsMa...@gmail.com on 25 Dec 2012 at 6:33

GoogleCodeExporter commented 8 years ago
After removing code similar to 
http://www.qt.gitorious.org/qt-mobility/qt-mobility/blobs/master/examples/audior
ecorder/audiorecorder.cpp which uses QMediaRecorder from the BB10 build, indeed 
the `no service found for - "com.nokia.qt.audiosource"' message goes away. TBD, 
whether the QML Audio playback part works or not. Will install data&database 
from N9 to see whether other parts are working, and/or recode segments emitting

 calling Recorder.beginRecording()...scripts/audio.js:37: ReferenceError: Can't find variable: Recorder

by implementing the elided 'Recorder' object in QML using bb.multimedia?

Original comment by NielsMa...@gmail.com on 25 Dec 2012 at 7:04

GoogleCodeExporter commented 8 years ago
A somewhat official answer to the status of this issue on BB10 and hope for 
eventual support?

http://devblog.blackberry.com/2012/11/writing-qt-apps-blackberry-10/

"The QtMultimediaKit module is included in the BlackBerry 10 NDK except for 
QMediaRecorderControl (and so no QMediaRecorder) and Camera APIs. Development 
teams in RIM are working to provide support for these and other modules in the 
future." 

Original comment by NielsMa...@gmail.com on 28 Dec 2012 at 6:38