diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9cab88dbd6ea..d1fe1a84dfd7 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2675,12 +2675,6 @@ packages: type-detect: 4.0.8 dev: false - /@sinonjs/fake-timers/10.0.2: - resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} - dependencies: - '@sinonjs/commons': 2.0.0 - dev: false - /@sinonjs/fake-timers/10.3.0: resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} dependencies: @@ -4420,6 +4414,7 @@ packages: /debuglog/1.0.1: resolution: {integrity: sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. dev: false /decamelize-keys/1.1.1: @@ -4716,7 +4711,7 @@ packages: dependencies: semver: 7.5.3 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230629 + typescript: 5.2.0-dev.20230705 dev: false /duplexer3/0.1.5: @@ -10180,8 +10175,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230629: - resolution: {integrity: sha512-/8eGjHX3BI9Cpb2ghyC3qeWD4PTXx7npbvZuKsphLdvFJkbOrKbvmnYGW+3QKs5rREjTq5/0A4IIlp9yCIit0g==} + /typescript/5.2.0-dev.20230705: + resolution: {integrity: sha512-eMgfQ/e5CgYYSaduGhDc2UiY2EzzgrBMfHyagjUP70jj4VDCmLlIp1EftT5AMiLvNc7PYNCeziRFY5fBZhD9uA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -17369,7 +17364,7 @@ packages: dev: false file:projects/communication-call-automation.tgz: - resolution: {integrity: sha512-vqoOQKwPc05FTHfiXBdWLvJ/9ZHsb7W3QCyGYinX/zi/SBSiIMH2oBIwIgFEPFVb0oA4zYa76Je8yHxpbQaItw==, tarball: file:projects/communication-call-automation.tgz} + resolution: {integrity: sha512-IRdS/57jo2pxVcVQfh1110Z+o6Xl08ajVRnZgu7KxC9xZlppm20YhYSH/DZXQCEKMf8fhCdqLlhCXqDxrg1Cqg==, tarball: file:projects/communication-call-automation.tgz} name: '@rush-temp/communication-call-automation' version: 0.0.0 dependencies: @@ -17384,6 +17379,7 @@ packages: cross-env: 7.0.3 dotenv: 16.3.1 eslint: 8.43.0 + esm: 3.2.25 events: 3.3.0 inherits: 2.0.4 karma: 6.4.2 @@ -18170,7 +18166,7 @@ packages: dev: false file:projects/core-client.tgz: - resolution: {integrity: sha512-DD1MezAP4ZkP3o8F2g80m0zqnyYXxrvexL35titsE8+UprlOKcrJVMYF++ZUYgMEHrdn0ty6v7tUctmPgqQOwg==, tarball: file:projects/core-client.tgz} + resolution: {integrity: sha512-0f6tvrsFDRRLUf6atVFtPIUCMCDCIZDBMFSobCRb25oZ/1UFenVZLZ60MYTTtTswPKJfR3gvlwt4J5JCCACxOg==, tarball: file:projects/core-client.tgz} name: '@rush-temp/core-client' version: 0.0.0 dependencies: @@ -18535,13 +18531,13 @@ packages: dev: false file:projects/cosmos.tgz: - resolution: {integrity: sha512-YFCaW1JpVf6hza6MzlJ9v9wWbgl/C4MG8/RZ7R8D7li+fnhDi9PPZUfaxlPd/on5bdWX+7yK5U2JNVh28jEUXA==, tarball: file:projects/cosmos.tgz} + resolution: {integrity: sha512-LJz+1OIFq2SgnmWTitdaXdnVjEhoeYKGPGZpktlZRmqzTYQXHYXuxgNW2wvvJrKUfJ2eKkOnf3P5HFBSCAw2DQ==, tarball: file:projects/cosmos.tgz} name: '@rush-temp/cosmos' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.36.0_@types+node@14.18.51 - '@sinonjs/fake-timers': 10.0.2 + '@sinonjs/fake-timers': 10.3.0 '@types/debug': 4.1.8 '@types/mocha': 7.0.2 '@types/node': 14.18.51 diff --git a/sdk/communication/communication-call-automation/package.json b/sdk/communication/communication-call-automation/package.json index 97e6e264adad..0028690b6a36 100644 --- a/sdk/communication/communication-call-automation/package.json +++ b/sdk/communication/communication-call-automation/package.json @@ -79,6 +79,7 @@ "@azure/core-rest-pipeline": "^1.3.0", "@azure/core-tracing": "^1.0.0", "@azure/logger": "^1.0.0", + "esm": "^3.2.25", "events": "^3.0.0", "tslib": "^2.2.0", "uuid": "^8.3.0" diff --git a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md index bd6bf2237d53..9c5bd52e917b 100644 --- a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md +++ b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md @@ -196,6 +196,8 @@ export interface CallMediaRecognizeOptions extends OperationOptions { // (undocumented) playPrompt?: FileSource | TextSource | SsmlSource; // (undocumented) + speechModelEndpointId?: string; + // (undocumented) stopCurrentOperations?: boolean; } @@ -856,6 +858,8 @@ export interface SendDtmfOptions extends OperationOptions { // @public export interface SsmlSource extends PlaySource { + // (undocumented) + customVoiceEndpointId?: string; // (undocumented) readonly kind: "ssmlSource"; // (undocumented) @@ -878,6 +882,8 @@ export type StopRecordingOptions = OperationOptions; // @public export interface TextSource extends PlaySource { + // (undocumented) + customVoiceEndpointId?: string; // (undocumented) readonly kind: "textSource"; // (undocumented) diff --git a/sdk/communication/communication-call-automation/src/callMedia.ts b/sdk/communication/communication-call-automation/src/callMedia.ts index dcc571b6616c..7e597e341b12 100644 --- a/sdk/communication/communication-call-automation/src/callMedia.ts +++ b/sdk/communication/communication-call-automation/src/callMedia.ts @@ -79,6 +79,7 @@ export class CallMedia { sourceLocale: playSource.sourceLocale, voiceGender: playSource.voiceGender, voiceName: playSource.voiceName, + customVoiceEndpointId: playSource.customVoiceEndpointId, }; return { sourceType: KnownPlaySourceType.Text, @@ -88,6 +89,7 @@ export class CallMedia { } else if (playSource.kind === "ssmlSource") { const ssmlSource: SsmlSourceInternal = { ssmlText: playSource.ssmlText, + customVoiceEndpointId: playSource.customVoiceEndpointId, }; return { sourceType: KnownPlaySourceType.Ssml, @@ -215,6 +217,7 @@ export class CallMedia { : 5, targetParticipant: serializeCommunicationIdentifier(targetParticipant), speechOptions: speechOptions, + speechRecognitionModelEndpointId: recognizeOptions.speechModelEndpointId, }; return { recognizeInputType: KnownRecognizeInputType.Speech, @@ -246,6 +249,7 @@ export class CallMedia { targetParticipant: serializeCommunicationIdentifier(targetParticipant), speechOptions: speechOptions, dtmfOptions: dtmfOptionsInternal, + speechRecognitionModelEndpointId: recognizeOptions.speechModelEndpointId, }; return { recognizeInputType: KnownRecognizeInputType.SpeechOrDtmf, diff --git a/sdk/communication/communication-call-automation/src/models/models.ts b/sdk/communication/communication-call-automation/src/models/models.ts index 109bc222f125..c7e8dc041da9 100644 --- a/sdk/communication/communication-call-automation/src/models/models.ts +++ b/sdk/communication/communication-call-automation/src/models/models.ts @@ -89,12 +89,14 @@ export interface TextSource extends PlaySource { sourceLocale?: string; voiceGender?: Gender; voiceName?: string; + customVoiceEndpointId?: string; readonly kind: "textSource"; } /** The SsmlSource model. */ export interface SsmlSource extends PlaySource { ssmlText: string; + customVoiceEndpointId?: string; readonly kind: "ssmlSource"; } diff --git a/sdk/communication/communication-call-automation/src/models/options.ts b/sdk/communication/communication-call-automation/src/models/options.ts index cd7dafaf6cc1..673dac377906 100644 --- a/sdk/communication/communication-call-automation/src/models/options.ts +++ b/sdk/communication/communication-call-automation/src/models/options.ts @@ -26,6 +26,7 @@ export interface CallMediaRecognizeOptions extends OperationOptions { operationContext?: string; interruptPrompt?: boolean; initialSilenceTimeoutInSeconds?: number; + speechModelEndpointId?: string; } /** The recognize configuration specific to Dtmf. */ diff --git a/sdk/communication/communication-call-automation/test/callMediaClient.spec.ts b/sdk/communication/communication-call-automation/test/callMediaClient.spec.ts index bfce9b7e1054..d6049679e8ec 100644 --- a/sdk/communication/communication-call-automation/test/callMediaClient.spec.ts +++ b/sdk/communication/communication-call-automation/test/callMediaClient.spec.ts @@ -97,6 +97,7 @@ describe("CallMedia Unit Tests", async function () { const playSource: TextSource = { text: "test test test", + customVoiceEndpointId: "customVoiceEndpointId", kind: "textSource", }; @@ -121,6 +122,7 @@ describe("CallMedia Unit Tests", async function () { const playSource: SsmlSource = { ssmlText: 'Recognize Choice Completed, played through SSML source.', + customVoiceEndpointId: "customVoiceEndpointId", kind: "ssmlSource", }; @@ -211,6 +213,7 @@ describe("CallMedia Unit Tests", async function () { const targetParticipant: CommunicationIdentifier = { communicationUserId: CALL_TARGET_ID }; const recognizeOptions: CallMediaRecognizeSpeechOptions = { kind: "callMediaRecognizeSpeechOptions", + speechModelEndpointId: "customModelEndpointId", }; const maxTonesToCollect = 5;