Closed dragonmantank closed 9 months ago
Merging #864 (445400e) into 3.x (3f94c41) will decrease coverage by
0.46%
. The diff coverage is16.66%
.
@@ Coverage Diff @@
## 3.x #864 +/- ##
==========================================
- Coverage 84.33% 83.87% -0.46%
==========================================
Files 121 121
Lines 1609 1619 +10
Branches 310 311 +1
==========================================
+ Hits 1357 1358 +1
- Misses 251 260 +9
Partials 1 1
Files Changed | Coverage Δ | |
---|---|---|
packages/vetch/lib/vetch.ts | 92.50% <0.00%> (-2.38%) |
:arrow_down: |
packages/voice/lib/voice.ts | 82.89% <0.00%> (-8.41%) |
:arrow_down: |
packages/server-client/lib/client.ts | 98.48% <100.00%> (+0.02%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Description
Fixed the response type expectations when downloading recordings and transcriptions.
This also adds a
downloadTranscription()
method to voice to make it easier to download transcriptions.Motivation and Context
By default, the
server-client
clients expect a response in JSON. This is fine for API calls as we almost always expect JSON responses, but voice recordings and transcriptions should be treated as buffers instead. This change lets recordings be downloaded usingres.buffer()
and transcripts be downloaded usingres.text()
decoding.Note that the
FileClient
by itself could have worked directly by overriding the config option as "text" since text just act like a generic buffer, but adding astream
response type is semantically more clear.Testing Details
Manual testing
Example Output or Screenshots (if appropriate)
Types of changes
Checklist