To detect Local Audio speech and noise, set the setVadObserver Observer and add the Callbacks to receive notifications.

Class: EnxRoom

Observer:

public void setVadObserver(EnxVadObserver enxVadObserver)

Callbacks: 

  • public void onSpeechDetected(JSONObject jsonObject) – Notification to the user when speech is detected at their endpoint.
  • public void onNoiseDetected(JSONObject jsonObject) – Notification to the user when noise is detected at their endpoint.
enxRoom.setVadObserver(this);

// Notification when speech is detected 
public void onSpeechDetected(JSONObject jsonObject) {
	 // jsonObject
	 /* {“result” : 0,“msg” : "String" } */
}


// Notification when noise is detected 
public void onNoiseDetected(JSONObject jsonObject) {
	// jsonObject
	 /* {“result” : 0,“msg” : "String" } */ 
}