specify target when generate azure token

This commit is contained in:
an-lee
2024-03-04 09:26:44 +08:00
parent 747b406c41
commit e8bea7cb0f
7 changed files with 35 additions and 17 deletions

View File

@@ -162,7 +162,10 @@ export class Recording extends Model<Recording> {
logger,
});
const { token, region } = await webApi.generateSpeechToken();
const { token, region } = await webApi.generateSpeechToken({
targetId: this.id,
targetType: "Recording",
});
const sdk = new AzureSpeechSdk(token, region);
const result = await sdk.pronunciationAssessment({