Bug bash for Direct Line Speech with Web Chat and C#/JavaScript bot
Steps
Prerequisites
- Make sure your box has Node.js 8.x installed
Create Azure Speech resource
- Create a new Azure Speech resource, either by
- Use this link
- On Portal
- Click "Create a resource"
- Click "AI + Machine Learning"
- Click "See all" (next to "Featured" on top)
- On "Cognitive Services" section, click "See More"
- Select "Speech"
- In Quick Start, write down subscription key and the region (inside endpoint, e.g.
westus2
)
Create a Web App bot
You must create Azure Speech resource first.
- Create a new Web App Bot
- Select C# Echo Bot for bot template
- Click "Test in Web Chat", make sure it is working
- Go to Channels settings
- Adds a new "Direct Line Speech" channel
- Cognitive service account, select your Azure Speech resource
Create a website with Web Chat
Before starting, first clone this repository.
Using a subscription key
- Edit
/transcript-using-key/index.html
- Update your subscription key at
COGNITIVE_SERVICE_KEY
- Update your region at
COGNITIVE_SERVICE_REGION
- Host the website by running
npx serve
- Navigate to the URL displayed (usually http://localhost:5000)
Using an authorization token
- Edit
/transcript-using-token/index.html
- Update your subscription key at
COGNITIVE_SERVICE_KEY
- Update your region at
COGNITIVE_SERVICE_REGION
- Host the website by running
npx serve
- Navigate to the URL displayed (usually http://localhost:5000)
Using a full React app
- Edit
/smart-display/src/fetchSpeechServicesCredentials.js
- Update your subscription key at
COGNITIVE_SERVICE_KEY
- Update your region at
COGNITIVE_SERVICE_REGION
- Run
npm install
- Run
npm start
- Navigate to the URL displayed (usually http://localhost:3000)