Skip to content

Commit 9222f11

Browse files
committed
Merge pull request #60 from Iegorchenkov/patch-1
Add charsetname for inputstream.
2 parents 544428f + b1bd2b9 commit 9222f11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)