├── README.md ├── voicetotext_0_0_0_0.zip └── voicetotext_0_0_0_0 ├── new_Trrigerforspeechtotext.js ├── new_button.html └── new_speech100.js /README.md: -------------------------------------------------------------------------------- 1 | # VoiceToText 2 | This solution is the voice to text by using Bing Speech API with Dynamics 365. 3 | 4 | # Overview 5 | A support agent can exchange to text by own voice. This solution contribute standadize input level each support agents. 6 | 7 | # How to work? 8 | 1. Open a Case form. 9 | 2. Click the [Start Recording] button. 10 | 3. Talk to your microphone about few seconds. 11 | 4. Set text of own voice to description field automatically. 12 | 13 | I tested Dynamics 365 Online (8.2.1.341) with Bing Speech APIs. 14 | 15 | # How to implement? 16 | ## 1. Enable Bing Speech API. 17 | 1. Login to Azure. 18 | 2. Search [Cognitive Services APIs] in search the market place. 19 | 3. Create [Cognitive Services APIs] also Select [Bing Speech API] to API type. 20 | 4. Copy subscription keys. 21 | 22 | ## 2. Setting the voicetotext solution file to Dynamics 365. 23 | 1. Open solution menu. 24 | 2. Import the voicetotext solution file. 25 | 3. Open the voicetotext solution record. 26 | 4. Open [Trrigerforspeechtotext.js] file. 27 | 5. Past the subscription key of Bing Speech API. 28 | 6. Save [Trrigerforspeechtotext.js] file. 29 | 7. Open Case form Editor. 30 | 8. Insert [new_Button.html] Web Resource to the Case form. 31 | 9. Publish All customizations 32 | 33 | -------------------------------------------------------------------------------- /voicetotext_0_0_0_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/takayakawano/VoiceToText/528aacf859e10d18b7a0e3e4a0b1b49b98bd6129/voicetotext_0_0_0_0.zip -------------------------------------------------------------------------------- /voicetotext_0_0_0_0/new_Trrigerforspeechtotext.js: -------------------------------------------------------------------------------- 1 | function startrec() { 2 | parent.Xrm.Page.getAttribute("description").setValue(""); 3 | 4 | client = Microsoft.CognitiveServices.SpeechRecognition.SpeechRecognitionServiceFactory.createMicrophoneClient( 5 | 0, //Recognition modes: Interactive mode, Conversation mode, Dictation mode 6 | "en-us", // Recognition language 7 | ""); // Please set YOUR_BING_SPEECH_API_KEY. 8 | 9 | client.onFinalResponseReceived = function (response) { 10 | parent.Xrm.Page.getAttribute("description").setValue(JSON.stringify(response[0].transcript)); 11 | } 12 | 13 | client.startMicAndRecognition(); 14 | setTimeout(function () { 15 | client.endMicAndRecognition(); 16 | }, 8000); // Please set the recording time(ms). 17 | } -------------------------------------------------------------------------------- /voicetotext_0_0_0_0/new_button.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /voicetotext_0_0_0_0/new_speech100.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/takayakawano/VoiceToText/528aacf859e10d18b7a0e3e4a0b1b49b98bd6129/voicetotext_0_0_0_0/new_speech100.js --------------------------------------------------------------------------------