-
Notifications
You must be signed in to change notification settings - Fork 22
feat(model/qwen3-tts-realtime):support instruct param #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,12 @@ public class QwenTtsRealtimeConfig { | |
| /** text normalization, default is true */ | ||
| @Builder.Default Boolean enableTn = true; | ||
|
|
||
| /** instructions for tts, default is null */ | ||
| @Builder.Default String instructions = null; | ||
|
|
||
| /** instructions will optimize on server side, default is null */ | ||
| @Builder.Default String optimizeInstructions = null; | ||
|
Comment on lines
+50
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The newly added parameters |
||
|
|
||
| /** The extra parameters. */ | ||
| @Builder.Default Map<String, Object> parameters = null; | ||
|
|
||
|
|
@@ -84,6 +90,14 @@ public JsonObject getConfig() { | |
| config.put(QwenTtsRealtimeConstants.ENABLE_TN, enableTn); | ||
| } | ||
|
|
||
| if (instructions != null) { | ||
| config.put(QwenTtsRealtimeConstants.INSTRUCTIONS, instructions); | ||
| } | ||
|
|
||
| if (optimizeInstructions != null) { | ||
| config.put(QwenTtsRealtimeConstants.OPTIMIZE_INSTRUCTIONS, optimizeInstructions); | ||
| } | ||
|
|
||
| if (parameters != null) { | ||
| for (Map.Entry<String, Object> entry : parameters.entrySet()) { | ||
| config.put(entry.getKey(), entry.getValue()); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Javadoc for
optimizeInstructionsis grammatically awkward and could be clearer. A better description would help users understand its purpose. For example: 'Instructions that will be optimized on the server side.'