@capacitor-community/text-to-speech 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,7 @@ import android.util.Log;
|
|
|
12
12
|
import com.getcapacitor.JSArray;
|
|
13
13
|
import com.getcapacitor.JSObject;
|
|
14
14
|
import java.util.ArrayList;
|
|
15
|
+
import java.util.Collections;
|
|
15
16
|
import java.util.Comparator;
|
|
16
17
|
import java.util.HashMap;
|
|
17
18
|
import java.util.Locale;
|
|
@@ -122,8 +123,14 @@ public class TextToSpeech implements android.speech.tts.TextToSpeech.OnInitListe
|
|
|
122
123
|
orderedVoices.add(supportedVoice);
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
Collections.sort(
|
|
127
|
+
orderedVoices,
|
|
128
|
+
new Comparator<Voice>() {
|
|
129
|
+
public int compare(Voice v1, Voice v2) {
|
|
130
|
+
return v1.hashCode() - v2.hashCode();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
);
|
|
127
134
|
|
|
128
135
|
return orderedVoices;
|
|
129
136
|
}
|