The DPG generation for the latest Whisper feature of @azure/openai is having mismatch type between "string" and "bytes". The type of the file property for transcription interface is string. This cause a build error because the type in the parameter is Uint8Array in all the getAudioTranscriptions here.
An example of the function signature is here
export function _getAudioTranscriptionSimpleJsonSend(
context: Client,
file: Uint8Array,
deploymentId: string,
options: GetAudioTranscriptionSimpleJsonOptions = { requestOptions: {} }
But the type definition is string here
export interface AudioTranscriptionOptionsSimpleJson {
/** The audio file object to transcribe. */
file: string;
Expectation: We expected the type of the file is Uint8Array. The definition in the TypeSpec file is bytes here.
Reproduce:
- Use the latest commit for the TypeSpec file
d33d47dc85ef1f2c29c3dd278ded3650df9e49d7
The DPG generation for the latest Whisper feature of @azure/openai is having mismatch type between "string" and "bytes". The type of the
fileproperty for transcription interface isstring. This cause a build error because the type in the parameter isUint8Arrayin all thegetAudioTranscriptionshere.An example of the function signature is here
But the type definition is
stringhereExpectation: We expected the type of the file is
Uint8Array. The definition in the TypeSpec file is bytes here.Reproduce:
d33d47dc85ef1f2c29c3dd278ded3650df9e49d7