1 00:00:00,930 --> 00:00:02,890 - [Presenter] In this video, I'm going to discuss 2 00:00:02,890 --> 00:00:06,530 the first three imports that you see here, each of which 3 00:00:06,530 --> 00:00:09,310 is from the IBM Watson Module 4 00:00:09,310 --> 00:00:12,910 from the Watson Developer Cloud SDK. 5 00:00:12,910 --> 00:00:15,190 Now, if by any chance you're following along 6 00:00:15,190 --> 00:00:17,627 with these videos in our book 7 00:00:17,627 --> 00:00:20,947 "Python for Programmers" or our textbook 8 00:00:20,947 --> 00:00:24,260 "Intro to Python for Computer Science and Data Science" 9 00:00:24,260 --> 00:00:26,340 in the book you're going to see here, 10 00:00:26,340 --> 00:00:28,750 instead of IBM underscore watson, 11 00:00:28,750 --> 00:00:33,370 you'll see watson underscore developer underscore cloud. 12 00:00:33,370 --> 00:00:36,410 And that's because they renamed the module since 13 00:00:36,410 --> 00:00:37,350 we published the book. 14 00:00:37,350 --> 00:00:41,670 However, the code as is in the book will also work. 15 00:00:41,670 --> 00:00:44,920 So they still have backwards compatibility. 16 00:00:44,920 --> 00:00:47,910 Now you'll notice we've imported three classes from 17 00:00:47,910 --> 00:00:49,760 the IBM Watson Module. 18 00:00:49,760 --> 00:00:54,720 The class called Speech to Text V1 is the first version 19 00:00:54,720 --> 00:00:58,080 of their speech to text class that accesses 20 00:00:58,080 --> 00:01:00,950 the Watson Speech to Text service for you. 21 00:01:00,950 --> 00:01:04,170 And as you're going to see in the code down below, 22 00:01:04,170 --> 00:01:06,900 with simple method calls on this object, 23 00:01:06,900 --> 00:01:10,660 we are going to be able to submit an audio file 24 00:01:10,660 --> 00:01:13,180 off to the speech to text service. 25 00:01:13,180 --> 00:01:17,070 It will then transcribe that text for us, assuming it's 26 00:01:17,070 --> 00:01:20,020 in a language that the service understands. 27 00:01:20,020 --> 00:01:23,470 And what it's going to give us back is a JSON document 28 00:01:23,470 --> 00:01:26,710 that contains the text transcription, which we of course 29 00:01:26,710 --> 00:01:31,090 will then access and pull out of that JSON object. 30 00:01:31,090 --> 00:01:34,540 We have the Language Translator service version 3. 31 00:01:34,540 --> 00:01:38,960 So this class encapsulates everything that needs to be done 32 00:01:38,960 --> 00:01:42,930 to communicate with Watson's Language Translator. 33 00:01:42,930 --> 00:01:46,780 And again, we'll take texts, in this case, hand it off 34 00:01:46,780 --> 00:01:48,970 to the language translator service, 35 00:01:48,970 --> 00:01:51,060 and what it will give us back, once again, 36 00:01:51,060 --> 00:01:55,260 is a JSON document containing the translated text. 37 00:01:55,260 --> 00:01:56,870 And, of course, this assumes 38 00:01:56,870 --> 00:01:59,630 that it's supported languages once again. 39 00:01:59,630 --> 00:02:03,710 And finally, we have the class Text to Speech V1, 40 00:02:03,710 --> 00:02:07,650 and for that one, we're going to give it text, 41 00:02:07,650 --> 00:02:11,120 which we then want to turn into an audio file. 42 00:02:11,120 --> 00:02:14,740 And what it's going to give us back is the audio file 43 00:02:14,740 --> 00:02:17,970 that we can then play back in our app. 44 00:02:17,970 --> 00:02:21,300 So, we'll see the use of each of these three classes 45 00:02:21,300 --> 00:02:24,270 as we take a look in a couple of videos from now 46 00:02:24,270 --> 00:02:27,363 at the run translator method, or function rather.