watson-developer-cloud / android-sdk

:high_brightness: Android SDK to use the IBM Watson services.
http://watson-developer-cloud.github.io/android-sdk/
Apache License 2.0
146 stars 94 forks source link

Mic volume #67

Closed INTKILOW closed 5 years ago

INTKILOW commented 5 years ago
m.setOnAmplitudeListener(new AmplitudeListener() {
  @Override
  public void onSample(double amplitude, double volume) {
    Log.e("TalkFragment","(:160)"+volume);
  }
});

Mic decibels cannot be obtained

germanattanasio commented 5 years ago

Please provide a set of reproducible steps. Check the CONTRIBUTING.md for an example.

lpatino10 commented 5 years ago

To get the amplitude and volume information, your speech data cannot be encoded. To ensure that, you need to instantiate your MicrophoneInputStream like so:

// false says not to encode the data
MicrophoneInputStream myInputStream = microphoneHelper.getInputStream(false);

That being said, some more code to help reproduce this will be helpful if the above doesn't work.

lpatino10 commented 5 years ago

Closing due to inactivity.