(hexAudio?: string)
| 8 | import type { SpeechResponse } from '../../src/types/api'; |
| 9 | |
| 10 | function makeSpeechResponse(hexAudio?: string): SpeechResponse { |
| 11 | return { |
| 12 | base_resp: { status_code: 0, status_msg: 'ok' }, |
| 13 | data: { |
| 14 | audio: hexAudio || Buffer.from('hello speech audio').toString('hex'), |
| 15 | status: 0, |
| 16 | }, |
| 17 | }; |
| 18 | } |
| 19 | |
| 20 | describe('MiniMaxSDK.speech', () => { |
| 21 | let server: MockServer; |