I would like to know if it's related to my netbook only or is this a common problem. Can anybody record audio using android-x86?
Looking for some feedback.
Thanks in advance.
(#Intent;action=android.speech.action.WEB_SEARCH;launchFlags=0x10000000;component=com.google.android.voicesearch/.RecognitionActivity;B.fullRecognitionResultsRequest=true;l.android.speech.extras.SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS=750;B.useLocation=true;B.contact_auth=true;l.android.speech.extras.SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS=-1;end)I/RecognitionControllerImpl( 2258): State change: STARTING -> STARTINGW/AudioHardwareInterface( 1488): getInputBufferSize bad sampling rate: 16000E/AudioRecord( 2258): Unsupported configuration: sampleRate 16000, format 1, channelCount 1D/ALSAModule( 1488): open called for devices 00040000 in mode 0...E/ALSAModule( 1488): Unable to set buffer size to 2048: Invalid argumentI/ALSAModule( 1488): Initialized ALSA CAPTURE device defaultD/ALSAModule( 1488): open called for devices 00040000 in mode 0...E/ALSAModule( 1488): Unable to set buffer size to 2048: Invalid argumentI/ALSAModule( 1488): Initialized ALSA CAPTURE device defaultE/AudioRecord( 2258): Could not get audio input for record source 6E/AudioRecord-JNI( 2258): Error creating AudioRecord instance: initialization check failed.E/AudioRecord-Java( 2258): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object.E/RecognitionControllerImpl( 2258): Audio errorE/RecognitionControllerImpl( 2258): java.io.IOException: not openE/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.endpointer.MicrophoneInputStream.<init>(MicrophoneInputStream.java:65)E/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.speechservice.MicrophoneManagerImpl.getMicInputStream(MicrophoneManagerImpl.java:108)E/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.speechservice.MicrophoneManagerImpl.setupMicrophone(MicrophoneManagerImpl.java:96)E/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.startRecognition(RecognitionControllerImpl.java:362)E/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.access$100(RecognitionControllerImpl.java:82)E/RecognitionControllerImpl( 2258): at com.google.android.voicesearch.speechservice.RecognitionControllerImpl$1.handleMessage(RecognitionControllerImpl.java:251)E/RecognitionControllerImpl( 2258): at android.os.Handler.dispatchMessage(Handler.java:99)E/RecognitionControllerImpl( 2258): at android.os.Looper.loop(Looper.java:132)E/RecognitionControllerImpl( 2258): at android.os.HandlerThread.run(HandlerThread.java:60)E/RecognitionControllerImpl( 2258): ERROR_AUDIOI/AudioService( 1513): AudioFocus abandonAudioFocus() from android.media.AudioManager@9e595900W/InputManagerService( 1513): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@9e705780 (uid=10035 pid=1594)
Got the same thing here, eee 900 on 3.2 - "Audio Problem" every time I try to do a voice search...Also, camera works - kinda. Takes pics, but the screen is black (can't see the preview) - checking that out now...
--To view this discussion on the web visit https://groups.google.com/d/msg/android-x86/-/zN_fHJtLOlsJ.
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-x86...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
2011/12/18 Shady Rasheed <rashee...@gmail.com>:
Changing the buffersize from 2048 to 320 or 640 and managed to record using speech recorder in 8000 Hz, but not in 11000 Hz. After making this change, AudioRecorder.apk works.static alsa_handle_t _defaultsIn = {
module : 0,
devices : AudioSystem::DEVICE_IN_ALL,
curDev : 0,
curMode : 0,
handle : 0,
format : SND_PCM_FORMAT_S16_LE, // AudioSystem::PCM_16_BIT
channels : 1,
sampleRate : AudioRecord::DEFAULT_SAMPLE_RATE,
latency : 250000, // Desired Delay in usec
bufferSize : 2048, // Desired Number of samples
modPrivate : 0,
};
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
// default implementationsize_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int format, int channelCount){if (sampleRate != 8000) {LOGW("getInputBufferSize bad sampling rate: %d", sampleRate);return 0;}if (format != AudioSystem::PCM_16_BIT) {LOGW("getInputBufferSize bad format: %d", format);return 0;}if (channelCount != 1) {LOGW("getInputBufferSize bad channel count: %d", channelCount);return 0;}return 320;}
Is it possible that the system is not detecting the capabilities of my device and simply using generic mode, same as in Emulator. I read on another android (non x86) forum some users complaining that on the emulator they can only run 8Khz sampling rate for recording, while on the actual device there is no problem.AudioHardwareInterface* AudioHardwareInterface::create()
{
/*
* FIXME: This code needs to instantiate the correct audio device
* interface. For now - we use compile-time switches.
*/
AudioHardwareInterface* hw = 0;
char value[PROPERTY_VALUE_MAX];
#ifdef GENERIC_AUDIO
hw = new AudioHardwareGeneric();
#else
// if running in emulation - use the emulator driver
if (property_get("ro.kernel.qemu", value, 0)) {
LOGD("Running in emulation - using generic audio driver");
hw = new AudioHardwareGeneric();
}
else {
LOGV("Creating Vendor Specific AudioHardware");
hw = createAudioHardware();
}
#endif
if (hw->initCheck() != NO_ERROR) {
LOGW("Using stubbed audio hardware. No sound will be produced.");
delete hw;
hw = new AudioHardwareStub();
}
#ifdef WITH_A2DP
hw = new A2dpAudioInterface(hw);
#endif
#ifdef ENABLE_AUDIO_DUMP
// This code adds a record of buffers in a file to write calls made by AudioFlinger.
// It replaces the current AudioHardwareInterface object by an intermediate one which
// will record buffers in a file (after sending them to hardware) for testing purpose.
// This feature is enabled by defining symbol ENABLE_AUDIO_DUMP.
// The output file is set with setParameters("test_cmd_file_name=<name>"). Pause are not recorded in the file.
LOGV("opening PCM dump interface");
hw = new AudioDumpInterface(hw); // replace interface
#endif
return hw;
}
I think it's impossible to enable voice search in android-x86.
That GMS app requires a native library libvoicesearch.so
which doesn't exist in x86 platform.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org