Skip to content

Conversation

@666ycy
Copy link
Collaborator

@666ycy 666ycy commented Jan 7, 2026

Description

Checklist

Fixes #<issue_number>

Add or Update API

  • I have added the necessary test case and all cases have passed.

@tomsun28 tomsun28 changed the title Update samples refactor: update tts asr api and samples Jan 7, 2026
@tomsun28 tomsun28 requested a review from Copilot January 7, 2026 06:08
@tomsun28
Copy link
Member

tomsun28 commented Jan 7, 2026

please run the mvn spring-javaformat:apply to fix the code style.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Text-to-Speech (TTS) and Automatic Speech Recognition (ASR) APIs by updating model identifiers, enhancing request parameters, and providing comprehensive sample implementations for both streaming and non-streaming scenarios.

  • Updated ASR and TTS model identifiers to newer versions (glm-asr-2512 and glm-tts)
  • Enhanced AudioTranscriptionRequest with new fields: fileBase64, prompt, and hotwords to support advanced transcription features
  • Simplified response data structures by removing unused fields from AudioTranscriptionChunk, AudioTranscriptionResult, and ChatFunction
  • Added four comprehensive sample files demonstrating both streaming and blocking audio operations

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ChatCompletionExample.java Added debug print statement for request object
AudioTranscriptionsStreamExample.java New sample demonstrating streaming audio transcription with chunk processing
AudioTranscriptionsExample.java New sample showing basic audio transcription with result processing
AudioSpeechStreamExample.java New sample for streaming TTS conversion with real-time audio chunk handling
AudioSpeechExample.java Enhanced with explicit stream and responseFormat configuration
ChatFunction.java Removed unused required field (now properly located in ChatFunctionParameters)
AudioTranscriptionResult.java Removed unused segments field to simplify response structure
AudioTranscriptionRequest.java Added new fields for advanced features: fileBase64, prompt, hotwords; updated duration limit documentation from 60s to 30s
AudioTranscriptionChunk.java Simplified structure by removing choices field, using direct delta string
AudioSpeechStreamingResponse.java Changed generic type from ObjectNode to ModelData for better type safety
AudioServiceImpl.java Added voice validation, updated file extension handling to use dynamic responseFormat
Constants.java Updated model identifiers: glm-asrglm-asr-2512, cogttsglm-tts with updated documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tomsun28 tomsun28 merged commit 18ca6db into main Jan 7, 2026
3 checks passed
@tomsun28 tomsun28 deleted the update-samples branch January 7, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants