Skip to content

Commit

Permalink
Voice download fix
Browse files Browse the repository at this point in the history
  • Loading branch information
berk76 committed Jan 30, 2021
1 parent 31bd41f commit 65e7011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cz/webstones/words/mp3/Mp3Creator.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private Mp3Creator() {}

public static void createMp3(String text, String lang, String file) throws Mp3CreatorException {
try {
String value = String.format(DATA, text, lang);
String value = String.format(DATA, text, lang.substring(0, 2));
String payload = String.format(PAYLOAD, URLEncoder.encode(value, "UTF-8"));
String resp = HttpUtils.sendPost(URL, payload, CONTENT_TYPE);
resp = resp.replaceFirst("\\)]}'", "");
Expand Down

0 comments on commit 65e7011

Please sign in to comment.