Closed Abhi55Y closed 4 years ago
@Abhi55Y If you are working on windows, you need to install gstreamer on your machine. You also need to put the path C:\gstreamer\1.0\x86_64\bin (assuming you have installed it in C:\gstreamer ) in your system path. After that it should work fine. Before shipping your product you need to look at the gstreamer license too.
If you are working on Android, please follow the the direction given in https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-use-codec-compressed-audio-input-streams?tabs=debian&pivots=programming-language-java to create libgstreamer_android.so. Put the created libgstreamer_android.so into your android app app\src\main\jniLibs\arm64-v8a\libgstreamer_android.so (assuming you are using arm64). Compile and run the app.
Do let us know if that solves your problem.
@Abhi55Y If you are working on windows, you need to install gstreamer on your machine. You also need to put the path C:\gstreamer\1.0\x86_64\bin (assuming you have installed it in C:\gstreamer ) in your system path. After that it should work fine. Before shipping your product you need to look at the gstreamer license too.
If you are working on Android, please follow the the direction given in https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-use-codec-compressed-audio-input-streams?tabs=debian&pivots=programming-language-java to create libgstreamer_android.so. Put the created libgstreamer_android.so into your android app app\src\main\jniLibs\arm64-v8a\libgstreamer_android.so (assuming you are using arm64). Compile and run the app.
Do let us know if that solves your problem.
The documentation of cognitive speech to text service and gstreamer is so confusing that we are unable to understand the exact steps. I request you to provide a fully functional sample because no developer can spend so much time on all this things. Or else provide some proper documentation or sample videos for all this.
The error I'm getting now is: ERROR: executing external native build for ndkBuild C:\Users\Aarambh\Desktop\cognitive-services-speech-sdk-master\samples\java\android\compressed-input\app\jni\Android.mk Affected Modules: app
And I'm unable to understand how to make libgstreamer_android.so
Kindly help me with a functional sample project which we can directly use in our apps.
@Abhi55Y I will provide you the steps for Android. By the way were you successful with running it on windows ?
@amitkumarshukla I didn't try on windows. Can you please provide me your personal email id or email me on shukla.hiren96@gmail.com. I am working on a project where I want to convert prerecorded audio file to text(transcriber). So I want to use microsoft speech to text api. I will be thankful to you if share me a working or functional project for the same. Or you can guide me for the same. Thank you in anticipation.
Just to note, we have added a work item to our backlog in order to provide a sample project that customers can use to build GStreamer for Android more easily. We will address this in a future release. Once the work is done, we will update this issue about when the sample will be available in public.
@Abhi55Y I am going to close this issue. Please try the instructions above again. We have done this internally, and it worked fine. We also now have an item on our backlog to create a sample that makes this easier. We don't know when we will have time to get to this though. When we do resolve the backlog item, we will update this issue to let you know how we resolved it, and if applicable, where to find the code sample. Thank you for using the Speech SDK!
I was working with azure speech service to convert an audio file(.mp3) to text using your sample code for an android(Java). But it is not working and throwing me the following exception:
"SPXERR_GSTREAMER_NOT_FOUND_ERROR"
The complete logcat file is attached below:
2020-06-06 15:49:38.686 24615-24615/? I/compressedinpu: Late-enabling -Xcheck:jni 2020-06-06 15:49:38.758 24615-24615/? E/compressedinpu: Unknown bits set in runtime_flags: 0x8000 2020-06-06 15:49:38.762 24615-24615/? I/compressedinpu: Reinit property: dalvik.vm.checkjni= false 2020-06-06 15:49:38.821 24615-24615/? E/libc: Access denied finding property "runtime.mmitest.isrunning" 2020-06-06 15:49:38.848 24615-24615/? D/ActivityThread: Attach thread to application 2020-06-06 15:49:38.902 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: The ClassLoaderContext is a special shared library. 2020-06-06 15:49:39.055 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::Init 2020-06-06 15:49:39.056 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::StartWatch 2020-06-06 15:49:39.056 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/ 2020-06-06 15:49:39.056 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/com.microsoft.cognitiveservices.speech.samples.compressedinput 2020-06-06 15:49:39.056 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all 2020-06-06 15:49:39.056 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::Run 2020-06-06 15:49:39.056 24615-24690/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::Reading 2020-06-06 15:49:39.056 24615-24690/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::CheckNotifyEvent 2020-06-06 15:49:39.056 24615-24690/com.microsoft.cognitiveservices.speech.samples.compressedinput I/compressedinpu: QarthPatchMonintor::CheckNotifyEvent before read 2020-06-06 15:49:39.070 24615-24659/com.microsoft.cognitiveservices.speech.samples.compressedinput I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.microsoft.cognitiveservices.speech.samples.compressedinput#10181#256 2020-06-06 15:49:39.071 24615-24659/com.microsoft.cognitiveservices.speech.samples.compressedinput I/HwApiCacheMangerEx: apicache path=/storage/0748-1500 state=mounted key=com.microsoft.cognitiveservices.speech.samples.compressedinput#10181#256 2020-06-06 15:49:39.080 24615-24659/com.microsoft.cognitiveservices.speech.samples.compressedinput I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.microsoft.cognitiveservices.speech.samples.compressedinput#10181#0 2020-06-06 15:49:39.080 24615-24659/com.microsoft.cognitiveservices.speech.samples.compressedinput I/HwApiCacheMangerEx: apicache path=/storage/0748-1500 state=mounted key=com.microsoft.cognitiveservices.speech.samples.compressedinput#10181#0 2020-06-06 15:49:39.109 24615-24695/com.microsoft.cognitiveservices.speech.samples.compressedinput E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@f447b2a 2020-06-06 15:49:39.111 24615-24695/com.microsoft.cognitiveservices.speech.samples.compressedinput E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@a2b6d1b 2020-06-06 15:49:39.128 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput V/ActivityThread: callActivityOnCreate 2020-06-06 15:49:39.129 24615-24659/com.microsoft.cognitiveservices.speech.samples.compressedinput I/AwareBitmapCacher: init processName:com.microsoft.cognitiveservices.speech.samples.compressedinput pid=24615 uid=10181 2020-06-06 15:49:39.183 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput V/HwWidgetFactory: : successes to get AllImpl object and return.... 2020-06-06 15:49:39.226 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/OverScrollerOptimization: start init SmartSlideOverScroller and get the overscroller config 2020-06-06 15:49:39.227 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/OverScrollerOptimization: get the overscroller config 2020-06-06 15:49:39.285 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/compressedinpu: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 2020-06-06 15:49:39.286 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/compressedinpu: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 2020-06-06 15:49:39.360 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput D/ActivityThread: add activity client record, r= ActivityRecord{5c71292 token=android.os.BinderProxy@6a571cc {com.microsoft.cognitiveservices.speech.samples.compressedinput/com.microsoft.cognitiveservices.speech.samples.compressedinput.MainActivity}} token= android.os.BinderProxy@6a571cc 2020-06-06 15:49:39.420 24615-24700/com.microsoft.cognitiveservices.speech.samples.compressedinput D/HiTouch_PressGestureDetector: onAttached, package=com.microsoft.cognitiveservices.speech.samples.compressedinput, windowType=1, mHiTouchRestricted=false 2020-06-06 15:49:39.451 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput I/iGraphics: [0020080c] pn: com.microsoft.cognitiveservices.speech.samples.compressedinput, p: 24615 2020-06-06 15:49:39.451 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput I/iGraphics: [0030080c] no spt app: com.microsoft.cognitiveservices.speech.samples.compressedinput 2020-06-06 15:49:39.472 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput D/mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , EGLBoolean) returns 0x3000 2020-06-06 15:49:39.489 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput W/Gralloc3: mapper 3.x is not supported 2020-06-06 15:49:39.628 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/HwViewRootImpl: removeInvalidNode jank list is null 2020-06-06 15:49:41.673 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/Settings: Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global. 2020-06-06 15:49:41.674 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput V/HiTouch_HiTouchSensor: User setup is finished. 2020-06-06 15:49:41.774 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput V/AudioManager: querySoundEffectsEnabled... 2020-06-06 15:49:41.804 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/compressedinput: type=1400 audit(0.0:1113658): avc: granted { read } for pid=24615 name="audio-file.mp3" dev="sdcardfs" ino=78282 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file 2020-06-06 15:49:41.804 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/compressedinput: type=1400 audit(0.0:1113659): avc: granted { read open } for pid=24615 path="/storage/emulated/0/Input/audio-file.mp3" dev="sdcardfs" ino=78282 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file 2020-06-06 15:49:42.842 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput E/SpeechSDKDemo: unexpected Exception with an error code: 0x29 (SPXERR_GSTREAMER_NOT_FOUND_ERROR)** 2020-06-06 15:49:42.850 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput I/Choreographer: Skipped 64 frames! The application may be doing too much work on its main thread. 2020-06-06 15:49:42.870 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput I/OpenGLRenderer: Davey! duration=1092ms; Flags=0, IntendedVsync=104453935193010, Vsync=104455001859634, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=104455009897081, AnimationStart=104455010022602, PerformTraversalsStart=104455011186144, DrawStart=104455011844477, SyncQueued=104455016699685, SyncStart=104455017663748, IssueDrawCommandsStart=104455018123644, SwapBuffers=104455025674685, FrameCompleted=104455028600727, DequeueBufferDuration=404000, QueueBufferDuration=1544000, 2020-06-06 15:49:44.139 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput D/AwareBitmapCacher: handleInit switch not opened pid=24615 2020-06-06 15:54:41.706 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/IInputConnectionWrapper: getExtractedText on inactive InputConnection 2020-06-06 15:54:41.723 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 2020-06-06 15:54:42.373 24615-24691/com.microsoft.cognitiveservices.speech.samples.compressedinput W/libEGL: EGLNativeWindowType 0x7594af1950 disconnect failed 2020-06-06 15:54:42.398 24615-24615/com.microsoft.cognitiveservices.speech.samples.compressedinput V/ActivityThread: Handle window ActivityRecord{5c71292 token=android.os.BinderProxy@6a571cc {com.microsoft.cognitiveservices.speech.samples.compressedinput/com.microsoft.cognitiveservices.speech.samples.compressedinput.MainActivity}} visibility: false 2020-06-06 15:54:47.005 24615-24651/com.microsoft.cognitiveservices.speech.samples.compressedinput W/System: A resource failed to call close.
Expected behavior I want any prerecorded audio file to get converted into text(Transcription) .
Platform, Operating System, and Programming Language
Please help me with the same as soon as possible.