Skip to content

Conversation

137-rick
Copy link
Contributor

@137-rick 137-rick commented Sep 9, 2025

add emotion and emotion_scale parameter

Summary by CodeRabbit

  • New Features
    • Added optional “emotion” and “emotion_scale” parameters to audio speech synthesis requests, allowing finer control over vocal expressiveness.
    • These parameters are fully optional; existing integrations continue to work unchanged.
    • When provided, “emotion” selects the desired emotional tone, and “emotion_scale” adjusts its intensity for more nuanced output.

add emotion and emotion_scale parameter
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

coderabbitai bot commented Sep 9, 2025

Walkthrough

Adds two optional fields, Emotion (string pointer) and EmotionScale (float32 pointer), to the CreateAudioSpeechReq struct in audio_speech.go, enabling these parameters to be included in the /v1/audio/speech request payload. No changes to request construction, response handling, or control flow.

Changes

Cohort / File(s) Summary of changes
Audio speech request schema updates
audio_speech.go
Added fields to CreateAudioSpeechReq: Emotion *string \json:"emotion"`andEmotionScale *float32 `json:"emotion_scale"``.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

feature

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely references the main change by indicating that emotion and emotion_scale parameters are added to audio_speech.go, accurately summarizing the core update in the pull request.
Description Check ✅ Passed The description clearly states the addition of emotion and emotion_scale parameters, reflecting the core change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

A nibble of code, a hop of delight,
New tones to speak—soft day, bold night.
Emotion scales set, the waveform sings,
Carrots in cache and joyful pings.
I twitch my ears at PRs so sweet—
Now our speech can smile and beat. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly identifies the key change by noting that the audio_speech.go file is being updated to include the new emotion and emotion_scale parameters, which directly reflects the main purpose of the pull request without introducing unrelated details or ambiguity.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

@chyroc chyroc added the feature label Sep 29, 2025
@chyroc chyroc changed the title Update audio_speech.go add emotion and emotion_scale feat: Update audio_speech.go add emotion and emotion_scale Sep 29, 2025
@chyroc chyroc merged commit 77aed50 into coze-dev:main Sep 29, 2025
11 of 13 checks passed
@chyroc
Copy link
Contributor

chyroc commented Sep 29, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants