Voice Activity Detection Feature in Kurento

267 views
Skip to first unread message

trur...@gmail.com

unread,
Oct 15, 2018, 1:55:25 AM10/15/18
to kurento
Hello everyone,

I wanted to have a voice activity detection feature in kurento for dominant speaker selection. Does anyone has the pointers or implemented the same?

Actually i got hold of one gstreamer plugin "level" to get the decibel level of various streams. i am able to run this plugin independently successfully. Now can someone tell me where to integrate this plugin in kurento media server code for voice activity detection feature implementation.i assume that this plugin need to be injected to be in pipeline but need to know the location in kurento media server code.

please help me with this. Appreciate a quick response here.

regards
Inder

Micael Gallego

unread,
Oct 15, 2018, 3:07:05 AM10/15/18
to kur...@googlegroups.com
You will have to create a Kurento Module with it. 



Regards.




--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/bad8419d-60fd-4dc0-a55e-2efd38011d4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

truring truring

unread,
Oct 17, 2018, 4:43:52 AM10/17/18
to kur...@googlegroups.com
Hi,

i followed all the instructions specified in the link shared by you. i have successfully created a module and generated the client code for java.
Now i am trying to use the module in my java application but it does not work. it is giving a compilation error as it is not able to find the module in my local repository.

i have already installed the module in my local maven repository. do i need to perform anyother step as well beside the steps specified in link.

regards
Inder

Micael Gallego

unread,
Oct 17, 2018, 4:49:37 AM10/17/18
to kur...@googlegroups.com
It seems the module is not correctly installed on your local repository. 

Or maybe it is not well generated. Can you see the Java code generated? Try to put this code "by hand" in your project to see if it compiles. If yes, you have a problem installed lib in your local repository. If not, there is a problem with the code generation.

Best regards

Micael Gallego
Kurento / OpenVidu Project Lead


truring truring

unread,
Oct 17, 2018, 9:43:49 AM10/17/18
to kur...@googlegroups.com
Hi,

Thanks for the quick response. Somehow i resolved that error by putting my generated client code directly in my project.
but now while creating the pipeline i am getting this error on kurento media server.

2018-10-17T19:06:46,629345 20070 0x00007f4c8085e700   debug KurentoWebSocketTransport WebSocketTransport.cpp:427 processMessage()  Message: {"id":6,"method":"create","params":{"type":"voice_det","constructorParams":{"mediaPipeline":"237c5190-c4b4-449e-bbe8-10abd161c248_kurento.MediaPipeline"},"properties":{},"sessionId":"6187d2b5-fa66-44a8-a7d0-98b8e9a6b91e"},"jsonrpc":"2.0"}
2018-10-17T19:06:46,629580 20070 0x00007f4c8085e700   error KurentoModuleManager      ModuleManager.cpp:213 getFactory()  Factory voice_det not found: map::at
2018-10-17T19:06:46,629736 20070 0x00007f4c8085e700     log KurentoServerMethods      ServerMethods.cpp:332 postProcess()  Caching: {
   "error" : {
      "code" : 40108,
      "data" : {
         "type" : "MEDIA_OBJECT_NOT_AVAILABLE"
      },
      "message" : "Factory 'voice_det' not found"
   },
   "id" : 6,
   "jsonrpc" : "2.0"

I am not able to understand where to add the module in factory. what to do for that thing..? i have kept my module(libvoice_det.so) at  path /usr/lib/x86_64-linux-gnu/gstreamer-1.5.

please help me with this. Appreciate quick response here.

regards
Inder

Micael Gallego

unread,
Oct 17, 2018, 11:30:45 AM10/17/18
to kur...@googlegroups.com
You will have to install your custom plugin in the Kurento Media Server used by OpenVidu.

Best regards

Micael Gallego
Kurento / OpenVidu Project Lead

truring truring

unread,
Oct 17, 2018, 12:29:30 PM10/17/18
to kur...@googlegroups.com
Hi,

Won't keeping the .so file directly at path /usr/lib/x86_64-linux-gnu/gstreamer-1.5 or 
/usr/lib/x86_64-linux-gnu/kurento/modules/ work? 

Regards 
Inder

trur...@gmail.com

unread,
Oct 21, 2018, 5:36:22 AM10/21/18
to kurento
Hi,

In continuation to the development of voice activity detection feature, I need to send an asynchronous message from Media server to Client application on detecting a high decibel voice. So need some help regarding this how to send subscribe and send the events between media server and application. Do i need to create an new event for same or any existing event would work..?

requesting you help me with this. appreciate a quick response here.

regards
Inder 

Micael Gallego

unread,
Oct 21, 2018, 7:29:24 AM10/21/18
to kur...@googlegroups.com
You have to create a new event to send this information..take a look to the implementation of any other module that send events to client.

Do you plan to publish your module with an open source license? If it is Apache, we could include it in oficial KMS distribution.

Regards

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.

truring truring

unread,
Oct 22, 2018, 3:34:53 AM10/22/18
to kur...@googlegroups.com
Hi,

Thanks for your reply.
the event trigger in my module will be based upon the messages i received on bus. for that i need to put a watchpoint as below

bus = gst_element_get_bus (pipeline);
  watch_id = gst_bus_add_watch (bus, message_handler, NULL);

In message handler, i am thinking about triggering the event. But the problem here is that i don't have an access to pipeline in my moule file (gstvoicedetection.cpp). the one which gets generated in gst-plugin folder by code generator.
Please help me with this.

regards
Inder

Micael Gallego

unread,
Oct 22, 2018, 7:07:41 AM10/22/18
to kur...@googlegroups.com
Take a look how is implemented in other built in Kurento Modules.

Regards

truring truring

unread,
Oct 23, 2018, 1:27:46 AM10/23/18
to kur...@googlegroups.com
Hi 

I don't see the pipeline pointer created initially getting used in other modules. I am not able to locate that.
Please point me to that location in code where it is using pipeline pointer.

regards
Inder

Micael Gallego

unread,
Oct 23, 2018, 3:16:36 AM10/23/18
to kur...@googlegroups.com

Best regards

Micael Gallego
Kurento / OpenVidu Project Lead

truring truring

unread,
Oct 24, 2018, 2:52:13 AM10/24/18
to kur...@googlegroups.com
Hi,

i am getting this error while running my custom module

 gstelement.c:904 gst_element_get_static_pad()  no such pad 'sink' in element "voicedetection0"
2018-10-24T12:17:54,994394 5652 0x00007f5944f5c700    info GST_ELEMENT_PADS          gstelement.c:904 gst_element_get_static_pad()  no such pad 'src' in element "voicedetection0"
2018-10-24T12:17:54,994439 5652 0x00007f5944f5c700   error filterelement             kmsfilterelement.c:148 kms_filter_element_set_filter() <kmsfilterelement1>  Invalid factory "voicedetection", unexpected pad templates

i have defined the PAD templates in class_init function as below

gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
                                      gst_pad_template_new ("src", GST_PAD_SRC,
                                          GST_PAD_ALWAYS,
                                          gst_caps_from_string (VIDEO_SRC_CAPS) ) );
  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
                                      gst_pad_template_new ("sink", GST_PAD_SINK,
                                          GST_PAD_ALWAYS,
                                          gst_caps_from_string (VIDEO_SINK_CAPS) ) );

do i need to do something else as well and define somewhere else. Please help me for same.

regards
Inder

Micael Gallego

unread,
Oct 24, 2018, 3:12:27 AM10/24/18
to kur...@googlegroups.com
It is difficult to say, the best you can do is use PlateDetector module as initial  module and start adding your own code.



truring truring

unread,
Oct 24, 2018, 7:13:21 AM10/24/18
to kur...@googlegroups.com
Hi,

As per your advice, i took platedetector code and modified slightly/added my code to fetch the root mean square values of audio stream using level plugin of gstreamer.
i have registered a signal handler on the bus. but in process bus message, following condition is never setting to true (i.e message->type is never getting set to GST_MESSAGE_ELEMENT)

if (message->type == GST_MESSAGE_ELEMENT) {

i have attached the code for reference. Please help me with this as this has become crucial for us.

Regards
Inder

code.zip

Truring Team

unread,
Oct 25, 2018, 2:07:15 AM10/25/18
to kur...@googlegroups.com
Hi

I am still waiting for response for my previous mail. requesting someone to help me with this.
I have one more query.

As per my usecase, i am trying to use a gstreamer plugin "level" to retrieve the audio decibel levels for voice activity detection. i have used an existing module platedetector and added my code in that.
now my question is that since the platedetector module has already been added to plugin at java client side, do i need to add this gstreamer plugin level in pipeline after creating it using gst_element_factory_make function. 

level plugin was created inside platedetector moule so won't this plugin be automatically part of pipeline whenever we will create the object of platedetector and call this statement as below

PlateDetectorFilter plateDetectorFilter = new PlateDetectorFilter.Builder(pipeline).build();

Please help me with this

regards
Inder


Reply all
Reply to author
Forward
0 new messages