This commit is contained in:
Rodrigo Rodriguez (pragmatismo.io) 2018-11-02 18:04:41 -03:00
parent d3337bd221
commit ef492836a6
3 changed files with 238 additions and 236 deletions

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@
"react-powerbi": "^0.3.1",
"react-scripts": "^2.1.1",
"react-transition-group": "^2.5.0",
"rxjs": "^5.5.12",
"url-join": "^4.0.0"
},
"scripts": {

View file

@ -40,12 +40,13 @@ import SidebarMenu from "./components/SidebarMenu.js";
import GBCss from "./components/GBCss.js";
import { DirectLine } from "botframework-directlinejs";
import { ConnectionStatus } from "botframework-directlinejs";
import { SpeechRecognizer } from "botframework-webchat/CognitiveServices";
import { SpeechSynthesizer } from "botframework-webchat/CognitiveServices";
import { SynthesisGender } from "botframework-webchat/CognitiveServices";
import { SpeechRecognizer } from "botframework-webchat";
import { SpeechSynthesizer } from "botframework-webchat";
import { SynthesisGender } from "botframework-webchat";
import { Chat } from "botframework-webchat";
import GBPowerBIPlayer from "./players/GBPowerBIPlayer.js";
import { UserAgentApplication } from "msal";
import { Observable } from 'rxjs'
class GBUIApp extends React.Component {
constructor() {
@ -322,19 +323,19 @@ class GBUIApp extends React.Component {
});
}
speechOptions = {
speechRecognizer: new SpeechRecognizer({
locale: "pt-br",
fetchCallback: (authFetchEventId) => getToken(),
fetchOnExpiryCallback: (authFetchEventId) => getToken()
}),
speechSynthesizer: new SpeechSynthesizer({
fetchCallback: (authFetchEventId) => getToken(),
fetchOnExpiryCallback: (authFetchEventId) => getToken(),
gender: SynthesisGender.Male,
voiceName: 'Microsoft Server Speech Text to Speech Voice (pt-BR, Daniel, Apollo)'
})
};
// speechOptions = {
// speechRecognizer: new SpeechRecognizer({
// locale: "pt-br",
// fetchCallback: (authFetchEventId) => getToken(),
// fetchOnExpiryCallback: (authFetchEventId) => getToken()
// }),
// speechSynthesizer: new SpeechSynthesizer({
// fetchCallback: (authFetchEventId) => getToken(),
// fetchOnExpiryCallback: (authFetchEventId) => getToken(),
// gender: SynthesisGender.Male,
// voiceName: 'Microsoft Server Speech Text to Speech Voice (pt-BR, Daniel, Apollo)'
// })
// };
chat = (
<Chat
@ -345,7 +346,7 @@ class GBUIApp extends React.Component {
line={this.state.line}
user={this.getUser()}
bot={{ id: "bot@gb", name: "Bot" }}
speechOptions={speechOptions}
// speechOptions={speechOptions}
/>
);