We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 514a4c6 commit 4061ab9Copy full SHA for 4061ab9
app/src/main/java/com/danielkim/soundrecorder/asynctasks/AsyncronusTranscription.java
@@ -137,7 +137,11 @@ public void onDisconnected() {
137
}
138
139
String extractedText = "";
140
- if(transcript[0].length() > 0) extractedText = transcript[0].substring(0, 1).toUpperCase() + transcript[0].substring(1);
+ if(transcript[0].length() > 0){
141
+ //check if result is a single char
142
+ if(transcript[0].length() == 1) extractedText = transcript[0].substring(0, 1).toUpperCase();
143
+ else extractedText = transcript[0].substring(0, 1).toUpperCase() + transcript[0].substring(1);
144
+ }
145
146
return extractedText;
147
0 commit comments