Home » Building Robots with TJBot Cognitive Class Exam Answers

Building Robots with TJBot Cognitive Class Exam Answers

by IndiaSuccessStories
0 comment

Introduction to Building Robots with TJBot

Building robots with TJBot is an exciting endeavor that combines hardware and software to create a customizable, interactive robot. TJBot, short for “Technology/Toy Joint Bot,” was originally created by IBM as an open-source project designed to integrate IBM Watson services with a Raspberry Pi and various peripherals.

Getting Started with TJBot

  1. Hardware Requirements:
    • Raspberry Pi: Preferably a Raspberry Pi 3 or 4, although other models may also work.
    • SD Card: To host the operating system (e.g., Raspbian).
    • Microphone: For voice interaction capabilities.
    • Speaker: For audio output.
    • LED: To add visual feedback.
    • Servo Motor: Optional for additional movements.
  2. Software Requirements:
    • Raspbian OS: Install the latest version on your Raspberry Pi.
    • Node.js: Required for running TJBot’s Node.js library.
    • TJBot library: Install the TJBot Node.js library from GitHub.
  3. Setting Up TJBot:
    • Assemble Hardware: Connect the microphone, speaker, LED, and any additional components.
    • Configure Software: Set up Raspbian OS, install Node.js, and then install the TJBot library.
    • Connect to Watson Services: Create IBM Cloud services (like Watson Assistant for conversation, Watson Visual Recognition for image recognition, etc.) and obtain API keys.

Programming TJBot

  • Node.js Programming: TJBot is primarily programmed using Node.js. You can write scripts to control TJBot’s movements, interact with its sensors, and utilize IBM Watson services for AI capabilities.
  • Example Projects:
    • Voice Interaction: Use the microphone and speaker to create a voice-controlled assistant.
    • Image Recognition: Utilize the camera (if attached) and Watson Visual Recognition to identify objects.
    • Language Understanding: Integrate Watson Assistant to create a chatbot that responds to user queries.
    • Emotion Analysis: Analyze facial expressions using Watson services coupled with a camera.

Resources and Community

  • Official Documentation: Refer to IBM’s official documentation and GitHub repository for detailed guides and examples.
  • Community Support: Engage with the TJBot community through forums, GitHub discussions, and social media channels to share ideas and troubleshoot issues.

Conclusion

Building robots with TJBot offers a hands-on way to explore AI, robotics, and IoT integration. By combining TJBot’s hardware capabilities with IBM Watson’s AI services, you can create innovative projects ranging from simple voice assistants to complex interactive systems. Get started today by gathering the necessary hardware, setting up the software environment, and exploring the endless possibilities of TJBot!

Building Robots with TJBot Cognitive Class Certification Answers

Question 1: What does the see method return? Select all that apply.

  • Names of objects
  • Names of colors
  • Names of people
  • An image taken with the camera

Question 2: Which of these statements are true about TJBot? Select all that apply.

banner
  • TJBot is a product sold by IBM.
  • TJBot is an open-source project.
  • TJBot is powered by artificial intelligence.
  • TJBot has a community of contributors who contribute recipes.

Question 3: What programming languages are supported by the TJBot libraries mentioned in this course? Select all that apply.

  • Node.js
  • Node-RED
  • Swift
  • Python

Question 4: Which one of these Watson services does not have a corresponding method in the TJBot library.

  • Speech to Text
  • Language Translator
  • Discovery
  • Text to Speech
  • Visual Recognition
  • Watson Assistant
  • Tone Analyzer

Question 5: Which method can be passed a duration value to specify how long the LED light should stay on?

  • shine
  • blink
  • pulse
  • turnOn

Question 1: In which order do these methods described in the course make the most logical sense?

  • isTranslatable, identifyLanguage, translate
  • translate, identifyLanguage, isTranslatable
  • identifyLanguage, isTranslatable, translate
  • isTranslatable, translate, identifyLanguage

Question 2: var TJBot = require(“tjbot”);

var tj = new TJBot( 

  [“camera”], 

  {}, 

  {

     visual_recognition: {

       apikey: “”   

     }

  });

tj.see(function(response) { 

  console.log(response);

});

  • Names of people
  • An array of objects containing names of objects and colors seen by the TJBot camera
  • An image captured by TJBot
  • Faces of people

Question 3: Which number points in the following Node.js code (#1, #2, #3, #4) should be corrected so that TJBot can say “Hello World” in English? Select all that apply.

var TJBot = require(“tjbot”);

var tj = new TJBot( 

  [“microphone”],  // #1

  {

    robot: {

      gender: “female” // #2

    },

    speak: {

      language: “fr-FR” // #3

    }

  },

  {

    text_to_speech: { // #4

      username: “cf63b1f3-ef18-4628-86c8-6b1871e076b9”,        

      password: “MWNwz3qcdIab”

    }

  });

tj.speak(“Hello World”);

  • #1
  • #2
  • #3
  • #4

Question 4: Review the following Node.js code. Which number points (#1, #2, #3, #4) in the following code should be corrected to make TJBot take a picture and speak out what is seen? Select all that apply.

var TJBot = require(“tjbot”);

var tj = new TJBot( 

  [“speaker”],  // #1

  {

    robot: {

      gender: “female” // #2

    },

    speak: {

      language: “en-US” // #3

    }

  },

  { // #4

    text_to_speech: {

      username: “cf63b1f3-ef18-4628-86c8-6b1871e076b9”,        

      password: “MWNwz3qcdIab”

    }

  });

tj.see(function(response) {

  tj.speak(“I see “+response.map(i => i.class).join(“, “));

}); 

  • #1
  • #2
  • #3
  • #4

Question 5: Which of the following blocks will speak out the phrase “Hello World” followed by pulsing the LED light the color green?

CODE BLOCK 1:

tj.speak(“hello world”).then(function() {

  tj.pulse(“green”, 1);

});

CODE BLOCK 2:

tj.speak(“hello world”);

tj.pulse(“green”, 1);

CODE BLOCK 3:

tj.speak(“hello world”).then(function() {

tj.pulse(1, “green”);

});

CODE BLOCK 4:

tj.pulse(“green”, 1);

tj.speak(“hello world”);

  • CODE BLOCK 1
  • CODE BLOCK 2
  • CODE BLOCK 3
  • CODE BLOCK 4

Question 1: What is the best way to determine whether a model is available in the Watson Language Translator service?

  • Use the translate method
  • Use the isTranslatable method
  • Check the Watson Language Translator documentation

Question 2: The TJBot capabilities can be extended both physically and in code by using third-party libraries or by writing custom code.

  • True
  • False

Question 3: The converse method can be used to do which tasks? Select all that apply.

  • Parse and process natural language
  • Have TJBot respond by voice
  • Provide a response to a user’s natural language input
  • Extract intents and entities trained in Watson Assistant

Question 4: TJBot can recognize the verbal emotions by using the method analyzeTone.

  • True
  • False

Question 5: Which methods can be chained together with the converse method? Select all that apply.

  • listen
  • speak
  • translate
  • analyzeTone

Question 6: What is the correct order of the following three arguments that are passed to the TJBot constructor?

1. Hardware, a JavaScript array of strings, i.e. speaker, microphone, camera

2. A JavaScript object with Watson service credentials

3. A JavaScript object with configuration settings like the language to speak

Select an option

  • #1 #3 #2
  • #1 #2 #3
  • #3 #2 #1
  • #2 #1 #3

Question 7: Jane wrote this code in Node.js, but the code is not working as expected. Which number points in the code identify the code that should be corrected? Select all that apply.

var TJBot = require(“tjbot”);

var tj = new TJBot( 

  [“speaker”],  // #1

  {

    listen: {

      language: “en-US” // #2  

    }

  }, 

  {

    speech_to_text: {

      username: “”,  // #3  

      password: “” // #4

    }

  });

tj.listen(function(text) { 

  console.log(text); 

});

tj.stopListening(); // #5 

  • #1
  • #2
  • #3
  • #4
  • #5

Question 8: Select all the core hardware that is supported by TJBot by default.

  • Raspberry Pi
  • Microphone
  • Thermometer
  • Speaker
  • Camera
  • LED light
  • Servo

Question 9: What is the variable workspaceId used for in the following code?

var TJBot = require(“tjbot”);

var tj = new TJBot(

  [“microphone”,”speaker”],

  {

    robot: {

      gender: “male”

    },

    speak: {

      language: “en-US”

    }

  },

  {

    speech_to_text: {

      username: “”,

      password: “”

    },

    conversation: {

      username: “”,

      password: “”

    },

    text_to_speech: {

      username: “cf63b1f3-ef18-4628-86c8-6b1871e076b9”,

      password: “MWNwz3qcdIab”

    }   

  }

);

var workspaceId = “”;

function processText(text) {

  console.log(text);

  tj.stopListening();

  tj.converse(workspaceId, text, response => {

    console.log(response);

    tj.speak(response.object.output.text.join(” “)).then(function(){

      tj.listen(processText);

    });

  });

}

tj.listen(processText);

  • It segregates multiple user’s conversations with TJBot.
  • It references a specific Watson Assistant service instance workspace that processes the natural language input
  • It is an identifier that is used to continue the interaction with a single user over multiple calls

Question 10: Review the following code. Then, review the code blocks. Select the code block number that you must change to add in the placeholder labeled TODO to complete this program?

var TJBot = require(“tjbot”);

var tj = new TJBot(

  [“camera”,”speaker”],

  {

    robot: {

      gender: “male”

    },

    speak: {

      language: “en-US”

    }

  },

  {

    // TODO: answer the question

    text_to_speech: {

      username: “”,

      password: “”

    }

  });

tj.see(function(objects) {

  console.log(objects);

  var text = “T J Bot sees ” + objects.map(item => item[“class”]).join(“, “);

  console.log(text);

  tj.speak(text);

});   

CODE BLOCK 1

visual_recognition: {

  username: “”,

  password: “”

},

CODE BLOCK 2

visual_recognition: {

  apikey: “”

},

CODE BLOCK 3

No code changes are required. This program will run correctly without any changes.

  • CODE BLOCK 1
  • CODE BLOCK 2
  • CODE BLOCK 3

You may also like

Leave a Comment

Indian Success Stories Logo

Indian Success Stories is committed to inspiring the world’s visionary leaders who are driven to make a difference with their ground-breaking concepts, ventures, and viewpoints. Join together with us to match your business with a community that is unstoppable and working to improve everyone’s future.

Edtior's Picks

Latest Articles

Copyright © 2024 Indian Success Stories. All rights reserved.