You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add audio file save support to SpeechSDK and MusicSDK
Add `save()` methods that decode hex-encoded audio from API responses
and write it to disk, matching the CLI's audio output behavior:
SpeechSDK.save(response, outPath?, ext?)
- Decodes hex audio data from synthesize() responses
- Validates hex format before decoding
- Creates intermediate directories as needed
- Generates timestamp-based default filenames (speech_<ts>.mp3)
- Handles disk-full (ENOSPC) errors gracefully
MusicSDK.save(response, outPath?, ext?)
- Same hex-decode logic for generate() responses
- Default filename prefix: music_<ts>.mp3
- Same validation and error handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments