Skip to content

Commit b1bd2b9

Browse files
committed
Update GSpeechDuplex.java
Propose to add charset name for input stream. Othercase work incorrectly with cyrillic symbols
1 parent 544428f commit b1bd2b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/com/darkprograms/speech/recognizer/GSpeechDuplex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ private Scanner openHttpsConnection(String urlStr) {
275275
httpConn.connect();
276276
resCode = httpConn.getResponseCode();
277277
if (resCode == HttpsURLConnection.HTTP_OK) {
278-
return new Scanner(httpConn.getInputStream());
278+
return new Scanner(httpConn.getInputStream(), "UTF-8");
279279
}
280280
else{
281281
System.out.println("Error: " + resCode);
@@ -520,4 +520,4 @@ private byte[][] chunkAudio(byte[] data) {
520520
}
521521
}
522522

523-
}
523+
}

0 commit comments

Comments
 (0)