Next, we add logic in our project to read a file from the disk, in our case an image. Learn how this needs to be in the proper format for the Vision API to accept.
- [Instructor] So with our basic project written…now let's go ahead and start writing custom logic.…Logic that allows me to make a request…to the Vision API, read a file from the file system,…authenticate, and get the results back.…Let's see how.…So the only file that I'm interested…in here is the index.ts.…So let me close everything else…and focus only on index.ts.…And I'd like you to remember that there is a file here…called config.tx where we have the endPoint and key.…
We will find that very useful shortly…but for now let's focus on index.ts.…So at a very high level, I'm going to need a function…call readImage which will go to the file system…and it will read an image from the file system…and provide it to me as a buffer.…So I'm going to go ahead and import…* as fs from the fs object, which is part of Node.js…And I'm also going to import Buffer,…which is also part of node Node.js, excellent.…
Next here I'm going to say const fileData…is fs.readFile, let's just go with Sync,…we're trying to keep things simple here…
Author
Released
3/9/2018- Exploring the possibilities of the Vision API
- Submitting an image to the Vision API for processing
- Asking the Vision API to recognize faces
- Working with the Speech API
- Writing speech-to-text code
- Working with the Language API
- Getting languages for translation
- Language Understanding (LUIS) concepts
Skill Level Intermediate
Duration
Views
Related Courses
-
Creating Bots with the Microsoft Bot Framework, Part 1
with Scott Peterson45m 41s Intermediate -
Creating Bots with the Microsoft Bot Framework, Part 2
with Scott Peterson50m 17s Intermediate
-
Introduction
-
Welcome1m 25s
-
What you should know2m 12s
-
-
1. The Vision API
-
Register your API3m 32s
-
Basic project structure4m 18s
-
Add TypeScript support2m 21s
-
Add debugging support2m 47s
-
Read image from disk2m 51s
-
Analyze images3m 45s
-
Recognize faces2m 35s
-
2. The Speech API
-
Set up your project2m 5s
-
Write speech-to-text code4m 17s
-
Run speech to text2m 27s
-
Run text to speech1m 23s
-
3. The Language API
-
Demo: Spell Check API2m 3s
-
LUIS concepts1m 59s
-
Create a LUIS app3m 59s
-
Set up your LUIS project2m 16s
-
Call LUIS app from code3m 32s
-
Conclusion
-
Next steps1m 42s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Read image from disk