open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 64 forks source link

Restructure new samples and move to open-horizon/examples #185

Closed bmpotter closed 4 years ago

bmpotter commented 5 years ago

Wifi Signal Scan sample - Troy

Offline Voice Assistant - Pooja

Smart Audio w/Edge - Lily

Security Camera Sample - Sadiyah

Edge Gateway - Sanjeev

Noise Compliance through Situational Awareness - James

Edge Fabric Chatbot - Ivan

Intranet Performance Monitor - Nadim

Switch2Msghub - Abhishek

Network Observer - Max

t-fine commented 4 years ago

Offline Voice Assistant (processtext)

Every 60 seconds this service records a five second audio clip, converts the audio clip to text locally on the edge device, finally having the host machine execute the command and speak the output. 

Before you begin

Ensure that your system meets the following requirements:

Registering your edge device

To run the processtext service example on your edge node, you must register your edge node with the IBM/pattern-ibm.processtext deployment pattern. Perform the steps in the Using the Offline Voice Assistant Example Edge Service with Deployment Pattern (https://github.com/open-horizon/examples/tree/master/edge/services/processtext#-using-the-offline-voice-assistant-example-edge-service-with-deployment-pattern) section of the readme file.

Additional information

The processtect example source code is also available in the Horizon GitHub repository as an example for IBM Edge Computing for Devices development. This source includes the code for all of the four services that run on the edge nodes for this example. 

These services include:

What to do next

For instructions on Building and Publishing Your Own Version of the Watson Speech to Text to IBM Event Streams Service (https://github.com/open-horizon/examples/blob/master/edge/services/processtext/CreateService.md#-building-and-publishing-your-own-version-of-the-offline-voice-assistant-edge-service) follow the steps in the processtext directory of the Open Horizon examples repository. 

t-fine commented 4 years ago

Watson Speech to Text to IBM Event Streams Service (watsons2text)

This service listens for the hot word "Watson," once detected it captures an audio clip that is sent to an instance of Speech to Text, optionally removing stop words, then the transcribed text is send to IBM Event Streams.

Before you begin

Ensure that your system meets the following requirements:

This service requires both an instance of IBM Event Streams and IBM Speech to Text to run correctly. For instructions on how to deploy an instance of event streams see the Host CPU load percentage (https://www.ibm.com/support/knowledgecenter/SSFKVV_3.2.1/devices/installing/cpu_load_example.html) example. 

Ensure the necessary IBM Event Stream environment variables are set:

echo "$EVTSTREAMS_API_KEY, $EVTSTREAMS_BROKER_URL"

The Event Streams topic this sample uses is myeventstreams by default. Though you can use any topic by setting the following environment variable:

export EVTSTREAMS_TOPIC=<your-topic-name>

Deploying an instance of IBM Speech to Text

If an instance is currently deployed, obtain the access information and set the environment variables, or follow the steps below.

  1. Navigate to the IBM Cloud.
  2. Click Create resource.
  3. Enter Speech to Text in the search box.
  4. Select the Speech to Text tile.
  5. Select a location, select a pricing plan, enter a service name, and click Create to provision the instance.
  6. After provisioning is complete, click the instance and note the credentials API Key and URL and export them as the following environment variables:
    export STT_IAM_APIKEY=<speech-to-text-api-key>
    export STT_URL=<speech-to-text-url>
  7. Go to the Getting Started section for instructions of how to test the Speech to Text service.

Registering your edge device

To run the watsons2text service example on your edge node, you must register your edge node with the IBM/pattern-ibm.watsons2text-arm deployment pattern. Perform the steps in the Perform the steps in the Using the Watson Speech to Text to IBM Event Streams Service with Deployment Pattern (https://github.com/open-horizon/examples/tree/master/edge/evtstreams/watson_speech2text#-using-the-ibm-watson-speech-to-text-to-ibm-event-streams-service-with-deployment-pattern) section of the readme file.

Additional information

The processtect example source code is also available in the Horizon GitHub repository as an example for IBM Edge Computing for Devices development. This source includes the code for all of the four services that run on the edge nodes for this example. 

These services include:

What to do next

For instructions on Building and Publishing Your Own Version of the Offline Voice Assistant Edge Service (https://github.com/open-horizon/examples/blob/master/edge/evtstreams/watson_speech2text/CreateService.md#-building-and-publishing-your-own-version-of-the-watson-speech-to-text-to-ibm-event-streams-service) follow the steps in the watson_speech2text directory of the Open Horizon examples repository. 

Rene-Ch1 commented 4 years ago

Doc part of this issue were reviewed and approved by Troy 11/20 for 3.2.1 - https://www-03preprod.ibm.com/support/knowledgecenter/SSFKVV_3.2.1/devices/installing/offline_voice_assistant.html and https://www-03preprod.ibm.com/support/knowledgecenter/SSFKVV_3.2.1/devices/installing/watson_speech.html

bmpotter commented 4 years ago

Verified