Skip to content

Commit

Permalink
Corrected region, and changed factory to provide token promise.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyanziano committed Oct 7, 2019
1 parent 745121c commit 9e4d7f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions packages/app/client/src/state/sagas/chatSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,15 @@ export class ChatSagas {
const { GetSpeechToken: command } = SharedConstants.Commands.Emulator;

try {
// const speechAuthenticationToken: Promise<string> = ChatSagas.commandService.remoteCall(
// command,
// endpoint.id,
// !!existingFactory
// );
const speechAuthenticationToken: string = yield ChatSagas.commandService.remoteCall(
const speechAuthenticationToken: Promise<string> = ChatSagas.commandService.remoteCall(
command,
endpoint.id,
!!existingFactory
);
console.log('INSIDE SAGA: ', speechAuthenticationToken);

const factory = yield call(createCognitiveServicesSpeechServicesPonyfillFactory, {
authorizationToken: speechAuthenticationToken,
region: 'westus', // Currently, the prod speech service is only deployed to westus
region: 'westus2', // Currently, the prod speech service is only deployed to westus2
});

yield put(webSpeechFactoryUpdated(documentId, factory)); // Provide the new factory to the store
Expand Down
2 changes: 1 addition & 1 deletion packages/emulator/core/src/authEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ export const v32Authentication = {

export const speech = {
// Access token for Cognitive Services API
tokenEndpoint: 'http://login.scratch.botframework.com/v3/speechtoken/speechservices', // 'http://login.botframework.com/v3/speechtoken/speechservices',
tokenEndpoint: 'http://login.botframework.com/v3/speechtoken/speechservices',
};

0 comments on commit 9e4d7f5

Please sign in to comment.