Skip to content

Commit

Permalink
Fix capitalization
Browse files Browse the repository at this point in the history
Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn committed Dec 24, 2024
1 parent a54483e commit 2b2911f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
*/
package org.openhab.voice.openaitts.internal;

import static org.openhab.voice.openaitts.internal.OpenAITTSConstants.TTS_SERVICE_ID;
import static org.openhab.voice.openaitts.internal.OpenAITTSConstants.TTS_SERVICE_PID;
import static org.openhab.voice.openaitts.internal.OpenAITTSConstants.*;

import java.util.Locale;
import java.util.Map;
Expand Down Expand Up @@ -111,7 +110,7 @@ public Set<Voice> getAvailableVoices() {

/**
* Synthesizes the given text to audio data using the OpenAI API
*
*
* @param text The text to synthesize
* @param voice The voice to use
* @param requestedFormat The requested audio format
Expand All @@ -123,7 +122,7 @@ public AudioStream synthesizeForCache(String text, Voice voice, AudioFormat requ
JsonObject content = new JsonObject();
content.addProperty("model", config.model);
content.addProperty("input", text);
content.addProperty("voice", voice.getLabel());
content.addProperty("voice", voice.getLabel().toLowerCase());
content.addProperty("speed", config.speed);

String queryJson = gson.toJson(content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public String getUID() {
*/
@Override
public String getLabel() {
return label;
return Character.toUpperCase(label.charAt(0)) + label.substring(1);
}

/**
Expand Down

0 comments on commit 2b2911f

Please sign in to comment.