Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0cb3cfe authored by Charles Chen's avatar Charles Chen
Browse files

[API] Add speaker Id for hds and vqds

We add a field to egress the speaker Ids.

Bug: 318617199
Test: atest CtsVoiceInteractionTestCases
Flag: ACONFIG android.service.voice.flags.allow_speaker_id_egress NEXTFOOD
Change-Id: I5fff92de96c78561eff3c1e23e19a893d128226b
parent 3ec10291
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -13176,10 +13176,12 @@ package android.service.voice {
    method public static int getMaxBundleSize();
    method public static int getMaxHotwordPhraseId();
    method public static int getMaxScore();
    method @FlaggedApi("android.service.voice.flags.allow_speaker_id_egress") public static int getMaxSpeakerId();
    method @Nullable public android.media.MediaSyncEvent getMediaSyncEvent();
    method public int getPersonalizedScore();
    method public int getProximity();
    method public int getScore();
    method @FlaggedApi("android.service.voice.flags.allow_speaker_id_egress") public int getSpeakerId();
    method public boolean isHotwordDetectionPersonalized();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field public static final int AUDIO_CHANNEL_UNSET = -1; // 0xffffffff
@@ -13213,6 +13215,7 @@ package android.service.voice {
    method @NonNull public android.service.voice.HotwordDetectedResult.Builder setMediaSyncEvent(@NonNull android.media.MediaSyncEvent);
    method @NonNull public android.service.voice.HotwordDetectedResult.Builder setPersonalizedScore(int);
    method @NonNull public android.service.voice.HotwordDetectedResult.Builder setScore(int);
    method @FlaggedApi("android.service.voice.flags.allow_speaker_id_egress") @NonNull public android.service.voice.HotwordDetectedResult.Builder setSpeakerId(int);
  }
  public abstract class HotwordDetectionService extends android.app.Service implements android.service.voice.SandboxedDetectionInitializer {
@@ -13353,7 +13356,9 @@ package android.service.voice {
  @FlaggedApi("android.service.voice.flags.allow_complex_results_egress_from_vqds") public final class VisualQueryDetectedResult implements android.os.Parcelable {
    method public int describeContents();
    method public static int getMaxSpeakerId();
    method @NonNull public String getPartialQuery();
    method public int getSpeakerId();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.voice.VisualQueryDetectedResult> CREATOR;
  }
@@ -13362,6 +13367,7 @@ package android.service.voice {
    ctor public VisualQueryDetectedResult.Builder();
    method @NonNull public android.service.voice.VisualQueryDetectedResult build();
    method @NonNull public android.service.voice.VisualQueryDetectedResult.Builder setPartialQuery(@NonNull String);
    method @NonNull public android.service.voice.VisualQueryDetectedResult.Builder setSpeakerId(int);
  }
  public abstract class VisualQueryDetectionService extends android.app.Service implements android.service.voice.SandboxedDetectionInitializer {
+86 −33

File changed.

Preview size limit exceeded, changes collapsed.

+69 −14

File changed.

Preview size limit exceeded, changes collapsed.

+7 −0
Original line number Diff line number Diff line
@@ -34,3 +34,10 @@ flag {
    description: "This flag allows visual query detection service egress detailed results. "
    bug: "318617199"
}

flag {
    name: "allow_speaker_id_egress"
    namespace: "machine_learning"
    description: "This flag allows hotword detection service and visual query detection service to egress current speaker profile id."
    bug: "318617199"
}
 No newline at end of file