Git Product home page Git Product logo

ibm / watson-voice-bot Goto Github PK

View Code? Open in Web Editor NEW
120.0 22.0 154.0 2.65 MB

Create a Watson Assistant chatbot that uses voice over a web browser.

Home Page: https://developer.ibm.com/patterns/create-a-web-based-voice-chatbot/

License: Apache License 2.0

HTML 11.39% JavaScript 47.03% CSS 14.52% Python 25.15% Shell 1.91%
watson-assistant ibmcode watson-speech-to-text watson-text-to-speech flask

watson-voice-bot's People

Contributors

dalmago avatar dependabot[bot] avatar dolph avatar imgbotapp avatar kant avatar ljbennett62 avatar markstur avatar omidmeh avatar ptrikkur avatar rameshpoomalai avatar rhagarty avatar sanjeevghimire avatar scottdangelo avatar stevemar avatar stevemart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watson-voice-bot's Issues

ValueError: authenticator must be provided

Traceback (most recent call last): File "C:\Users\MI\Desktop\ForReal\Voices\watson-voice-bot\app.py", line 128, in <module> assistant = AssistantV1(version="2021-06-14", authenticator=authenticator) File "C:\Users\MI\Desktop\ForReal\Voices\mytestenv\lib\site-packages\ibm_watson\assistant_v1.py", line 71, in __init__ BaseService.__init__(self, File "C:\Users\MI\Desktop\ForReal\Voices\mytestenv\lib\site-packages\ibm_cloud_sdk_core\base_service.py", line 96, in __init__ raise ValueError('authenticator must be provided') ValueError: authenticator must be provided

I have already copied and paste the api key and url, it still does not work, I have restarted the entire setup and it still throws the same error, what am i doing wrong? Thanks in advance

I can not get it to work

Hi I need help, please. Is implemented, the link is created, the text appears, but does not speak, I allow microphone but it does not take the audio. I have followed the steps, seen the videos and I do not know what the mistake is.

I follow the github guide, later I create IBM Cloud API Key: in Dallas.

Getting started with the IBM Cloud CLI
https://cloud.ibm.com/docs/cli?topic=cloud-cli-ibmcloud-cli&locale=en-US#overview

Then: Download, modify, and redeploy your Cloud Foundry app with the command line interface.

Change to the directory where your code is located.
cd your_new_directory

Connect and log in to IBM Cloud.
ibmcloud api https://api.ng.bluemix.net

bluemix app push watson-voice-bot-3
Access your app by browsing to https://watson-voice-bot-3-insightful-gnu.mybluemix.net.

potential enhancement

I made changes to app.py and sample.env file to use a customized Watson Speech2Text model. For my case, it greatly increased the accuracy.

I can create a PR if it's interesting to you guys. If not, I understand.

Thank you

Poor performance

Reported from dev advocacy in Tokyo:

The response takes more than 1 minute. (Tested with Watson API in Tokyo). Please investigate.

Deploy error at second stage

Hi guys can anyone help with this deploy error in the second stage;

Waiting for app to start...
FAILED
Start unsuccessful

TIP: use 'cf logs watson-voice-bot-20220513154240582 --recent' for more information
Job execution ended at Fri May 13 15:53:47 UTC 2022

full text is as per below:

Preparing to start the job...
Running on public worker: au-syd-tok05-backup
Job execution started at Fri May 13 15:44:33 UTC 2022
Pipeline image: latest
Preparing the build artifacts...
cf login -a "https://api.us-south.cf.cloud.ibm.com/" -u apikey -p "****" -o "[email protected]" -s "dev"
API endpoint: https://api.us-south.cf.cloud.ibm.com/
Authenticating...
OK

Targeted org [email protected]

Targeted space dev

API endpoint: https://api.us-south.cf.cloud.ibm.com/ (API version: 2.180.0)
User: [email protected]
Org: [email protected]
Space: dev
Creating service instance wvb-watson-assistant in org [email protected] / space dev as [email protected]...
OK

Service wvb-watson-assistant already exists
Creating service instance wvb-text-to-speech in org [email protected] / space dev as [email protected]...
OK

Service wvb-text-to-speech already exists
Creating service instance wvb-speech-to-text in org [email protected] / space dev as [email protected]...
OK

Service wvb-speech-to-text already exists
Pushing from manifest to org [email protected] / space dev as [email protected]...
Using manifest file /workspace/4816dbc4-b309-4a7e-a63e-06b97f68932b/manifest.yml
Getting app info...
Creating app with these attributes...

  • name: watson-voice-bot-20220513154240582
    path: /workspace/4816dbc4-b309-4a7e-a63e-06b97f68932b
    buildpacks:
  • python_buildpack
  • disk quota: 512M
  • instances: 1
  • memory: 128M
    services:
  • wvb-speech-to-text
  • wvb-text-to-speech
  • wvb-watson-assistant
    routes:
  • watson-voice-bot-20220513154240582.mybluemix.net

Creating app watson-voice-bot-20220513154240582...
Mapping routes...
Binding services...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...

0 B / 1.60 MiB 0.00%
192.00 KiB / 1.60 MiB 11.70%
512.00 KiB / 1.60 MiB 31.20%
1.12 MiB / 1.60 MiB 70.19%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00%
1.60 MiB / 1.60 MiB 100.00% 2s

Waiting for API to complete processing files...

Staging app and tracing logs...
Downloading python_buildpack...
Downloaded python_buildpack (4.5M)
Cell 33a42869-b23a-465a-afc6-9f59595e2625 creating container for instance 46bf4f8c-ee45-489d-bb5a-3655e58ddba6
Cell 33a42869-b23a-465a-afc6-9f59595e2625 successfully created container for instance 46bf4f8c-ee45-489d-bb5a-3655e58ddba6
Downloading app package...
Downloaded app package (1.6M)
-----> Python Buildpack version 1.7.53
-----> Supplying Python
-----> Installing python 3.10.4
Download [https://buildpacks.cloudfoundry.org/dependencies/python/python_3.10.4_linux_x64_cflinuxfs3_e053ca78.tgz]
Using python's pip module
-----> Running Pip Install
Collecting ibm-watson==5.2.3
Downloading ibm-watson-5.2.3.tar.gz (406 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 406.9/406.9 KB 6.8 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting Flask==1.1.1
Downloading Flask-1.1.1-py2.py3-none-any.whl (94 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.5/94.5 KB 4.8 MB/s eta 0:00:00
Collecting python-dotenv==0.10.3
Downloading python_dotenv-0.10.3-py2.py3-none-any.whl (16 kB)
Collecting flask-cors==3.0.9
Downloading Flask_Cors-3.0.9-py2.py3-none-any.whl (14 kB)
Collecting flask-socketio==4.2.1
Downloading Flask_SocketIO-4.2.1-py2.py3-none-any.whl (16 kB)
Collecting requests<3.0,>=2.0
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 KB 301.0 kB/s eta 0:00:00
Collecting websocket-client==1.1.0
Downloading websocket_client-1.1.0-py2.py3-none-any.whl (68 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.7/68.7 KB 1.8 MB/s eta 0:00:00
Collecting ibm-cloud-sdk-core==3.*,>=3.3.6
Downloading ibm-cloud-sdk-core-3.15.1.tar.gz (50 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.9/50.9 KB 667.7 kB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting python-dateutil>=2.5.3
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 KB 5.5 MB/s eta 0:00:00
Collecting Werkzeug>=0.15
Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 KB 5.7 MB/s eta 0:00:00
Collecting click>=5.1
Downloading click-8.1.3-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 3.1 MB/s eta 0:00:00
Collecting Jinja2>=2.10.1
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 6.1 MB/s eta 0:00:00
Collecting itsdangerous>=0.24
Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting Six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting python-socketio>=4.3.0
Downloading python_socketio-5.6.0-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.2/56.2 KB 3.6 MB/s eta 0:00:00
Collecting urllib3<2.0.0,>=1.26.0
Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.0/139.0 KB 7.6 MB/s eta 0:00:00
Collecting PyJWT<3.0.0,>=2.0.1
Downloading PyJWT-2.4.0-py3-none-any.whl (18 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting bidict>=0.21.0
Downloading bidict-0.22.0-py3-none-any.whl (36 kB)
Collecting python-engineio>=4.3.0
Downloading python_engineio-4.3.2-py3-none-any.whl (52 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.7/52.7 KB 1.7 MB/s eta 0:00:00
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.2/149.2 KB 3.7 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 KB 4.4 MB/s eta 0:00:00
Using legacy 'setup.py install' for ibm-cloud-sdk-core, since package 'wheel' is not installed.
Building wheels for collected packages: ibm-watson
Building wheel for ibm-watson (pyproject.toml): started
Building wheel for ibm-watson (pyproject.toml): finished with status 'done'
Created wheel for ibm-watson: filename=ibm_watson-5.2.3-py3-none-any.whl size=403321 sha256=6293495beb9cb2f15a3c774847508825066fe14cc5bea6220677e49da197392f
Stored in directory: /tmp/cache/final/pip_cache/pip/wheels/56/24/2f/1622dfa6e36d96d4f3df7b335822b80fa26ef2b8e219dab52f
Successfully built ibm-watson
Installing collected packages: python-dotenv, certifi, Werkzeug, websocket-client, urllib3, Six, python-engineio, PyJWT, MarkupSafe, itsdangerous, idna, click, charset-normalizer, bidict, requests, python-socketio, python-dateutil, Jinja2, ibm-cloud-sdk-core, Flask, ibm-watson, flask-socketio, flask-cors
WARNING: The script dotenv is installed in '/tmp/contents3222993510/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script normalizer is installed in '/tmp/contents3222993510/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for ibm-cloud-sdk-core: started
Running setup.py install for ibm-cloud-sdk-core: finished with status 'done'
WARNING: The script flask is installed in '/tmp/contents3222993510/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Flask-1.1.1 Jinja2-3.1.2 MarkupSafe-2.1.1 PyJWT-2.4.0 Six-1.16.0 Werkzeug-2.1.2 bidict-0.22.0 certifi-2021.10.8 charset-normalizer-2.0.12 click-8.1.3 flask-cors-3.0.9 flask-socketio-4.2.1 ibm-cloud-sdk-core-3.15.1 ibm-watson-5.2.3 idna-3.3 itsdangerous-2.1.2 python-dateutil-2.8.2 python-dotenv-0.10.3 python-engineio-4.3.2 python-socketio-5.6.0 requests-2.27.1 urllib3-1.26.9 websocket-client-1.1.0
Exit status 0
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (65M)
Uploaded droplet (66.8M)
Uploading complete
Cell 33a42869-b23a-465a-afc6-9f59595e2625 stopping instance 46bf4f8c-ee45-489d-bb5a-3655e58ddba6
Cell 33a42869-b23a-465a-afc6-9f59595e2625 destroying container for instance 46bf4f8c-ee45-489d-bb5a-3655e58ddba6

Waiting for app to start...
FAILED
Start unsuccessful

TIP: use 'cf logs watson-voice-bot-20220513154240582 --recent' for more information
Job execution ended at Fri May 13 15:53:47 UTC 2022

Finished: FAILED

We want to implement Speech-to-Text and Text-to-Speech functionality over IBM Watson Assistant.

We want to implement Speech-to-Text and Text-to-Speech functionality over IBM Watson Assistant.
Please assist with the process for the same.

We visited one of your repositories for the solution
https://github.com/IBM/watson-voice-bot/blob/master/doc/source/local.md#4-configure-env-with-credentials
Using this method, we are facing problems while executing the app.py file
Error: The chatbot speech icon is not functioning and is unable to record any voice input.
I'm attaching the screenshot of the problem.

fatal error

Hi! Whenever I am starting the service and want to talk, I receive this error on the server:

[2019-11-07 17:01:25,589] ERROR in app: Exception on /api/conversation [POST]
Traceback (most recent call last):
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py",
line 2446, in wsgi_app
response = self.full_dispatch_request()
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py",
line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask_cors\ext
ension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py",
line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask_compat.
py", line 39, in reraise
raise value
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py",
line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py",
line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "welcome.py", line 132, in getConvResponse
response = response.get_result()
UnboundLocalError: local variable 'response' referenced before assignment

why could it be??

Outdated README

Giving the demo a try I found that the description in the README seems to be older. The code still works, but to save others some time two things should be mentioned:

Deployment Error

Creating route watson-voice-bot.eu-gb.mybluemix.net...
OK

FAILED
Server error, status code: 400, error code: 210003, message: The host is taken: watson-voice-bot

Fix: Change name and host to something unique

name: watson-voice-bot

host: watson-voice-bot

Workspace ID vs Assistant ID and API Key

The example code uses v1 of the Assistant API so you have to get the Workspace ID instead of the Assistant ID of the skill. You have to get the API Key as well.

See https://cloud.ibm.com/apidocs/assistant for detailed information.

Waiting for app to start... FAILED Start unsuccessful

Trying the steps mentioned but getting stuck at the deploying step, everything was fine till build stage but it keep getting failed on Deploy Stage with below logs

===================================================================
4 certifi-2021.10.8 charset-normalizer-2.0.9 click-8.0.3 flask-cors-3.0.8 flask-socketio-4.2.1 ibm-cloud-sdk-core-3.13.2 ibm-watson-5.2.3 idna-3.3 itsdangerous-2.0.1 python-dateutil-2.8.2 python-dotenv-0.10.3 python-engineio-4.3.0 python-socketio-5.5.0 requests-2.26.0 urllib3-1.26.7 websocket-client-1.1.0
Exit status 0
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (59.5M)
Uploaded droplet (61.3M)
Uploading complete
Cell e4eb1323-6734-49f0-9d69-c2dbd4a1bc71 stopping instance 6493d65c-4e88-4a76-8b13-8a4da8c94fb2
Cell e4eb1323-6734-49f0-9d69-c2dbd4a1bc71 destroying container for instance 6493d65c-4e88-4a76-8b13-8a4da8c94fb2
Cell e4eb1323-6734-49f0-9d69-c2dbd4a1bc71 successfully destroyed container for instance 6493d65c-4e88-4a76-8b13-8a4da8c94fb2

Waiting for app to start...
FAILED
Start unsuccessful

TIP: use 'cf logs watson-voice-bot-001 --recent' for more information
Job execution ended at Tue Dec 21 06:07:34 UTC 2021

Finished: FAILED

reached out to so many people even posted it issue with Watson group but no one care to respond, can anyone help me resolve this issue, I am very new to Watson so have very minimal knowledge.

Enhancing client app to use npm

Current Problem:

  • watson-speech.js is a copy of node sdk - this way its hard to upgrade to latest
  • the auth token support will no longer be there when cloudfoundry instances will be deprecated. The auth token api doesn't work right now. [bug]

Proposed Refactoring:

  • make static folder an node app where dependencies are managed by npm. This way upgrading to latest SDK , extending and maintaining the app would be easier.
  • Fix auth token issue by not using auth token api any more.

Error opening the STT stream

Hello , following the instructions to use the app
Application is made available but does not work properly .
I get: Error opening the STT stream
Could it be related to the changes in the security model (TLS 1.0 to 1.2 ) ?
What would you advise to look for ?
Thank you

Multiple and option responses do not work

The bot works quite good. However, it does not say (and show) multiple responses and responses with options. It can recognize the intents relating to these responses and answers in a good manner as designed. For examples: there should be some responses after the sentence "I can help you with..... as follows". I am using lite plans for all services.

Screenshot (755)

different language?

What should I do if I want to implement it in a different language?
I have only a poor skill.

Deploy 1Failed

Preparing to start the job...
Running on public worker: jp-tokpublicworker02-2
Pipeline image: latest
Preparing the build artifacts...
cf login -a "https://api.us-south.cf.cloud.ibm.com" -u apikey -p "****" -o "[email protected]" -s "dev"
API endpoint: https://api.us-south.cf.cloud.ibm.com
Authenticating...
OK

Targeted org [email protected]

Targeted space dev

API endpoint: https://api.us-south.cf.cloud.ibm.com (API version: 2.164.0)
User: [email protected]
Org: [email protected]
Space: dev
Creating service instance wvb-watson-assistant in org [email protected] / space dev as [email protected]...
OK

Creating service instance wvb-text-to-speech in org [email protected] / space dev as [email protected]...
OK

Creating service instance wvb-speech-to-text in org [email protected] / space dev as [email protected]...
OK

Pushing from manifest to org [email protected] / space dev as [email protected]...
Using manifest file /workspace/a8653fd8-66b9-480b-a4e2-75557073a1cb/manifest.yml
Getting app info...
Creating app with these attributes...

  • name: watson-voice-bot-20210618015210255
    path: /workspace/a8653fd8-66b9-480b-a4e2-75557073a1cb
    buildpacks:
  • python_buildpack
  • disk quota: 512M
  • instances: 1
  • memory: 128M
    services:
  • wvb-speech-to-text
  • wvb-text-to-speech
  • wvb-watson-assistant
    routes:
  • watson-voice-bot-20210618015210255.mybluemix.net

Creating app watson-voice-bot-20210618015210255...
Mapping routes...
Binding services...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...

0 B / 1.59 MiB 0.00%
128.00 KiB / 1.59 MiB 7.84%
160.00 KiB / 1.59 MiB 9.80%
576.00 KiB / 1.59 MiB 35.29%
1.09 MiB / 1.59 MiB 68.62%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00%
1.59 MiB / 1.59 MiB 100.00% 2s

Waiting for API to complete processing files...

Staging app and tracing logs...
Downloading python_buildpack...
Downloaded python_buildpack
Cell 879700a2-564c-421c-9025-d97173c35f0b creating container for instance 30eb0400-4a8d-42ce-9433-f2fddb747ec4
Cell 879700a2-564c-421c-9025-d97173c35f0b successfully created container for instance 30eb0400-4a8d-42ce-9433-f2fddb747ec4
Downloading app package...
Downloaded app package (1.6M)
-----> Python Buildpack version 1.7.37
-----> Supplying Python
-----> Installing python 3.8.9
Download [https://buildpacks.cloudfoundry.org/dependencies/python/python_3.8.9_linux_x64_cflinuxfs3_e9cbc67f.tgz]
-----> Installing pip-pop 0.1.5
Download [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip-pop/pip-pop-0.1.5-b32efe86.tar.gz]
-----> Running Pip Install
Collecting ibm-watson==4.0.1
Downloading ibm-watson-4.0.1.tar.gz (297 kB)
Collecting Flask==1.1.1
Downloading Flask-1.1.1-py2.py3-none-any.whl (94 kB)
Collecting python-dotenv==0.10.3
Downloading python_dotenv-0.10.3-py2.py3-none-any.whl (16 kB)
Collecting flask-cors==3.0.8
Downloading Flask_Cors-3.0.8-py2.py3-none-any.whl (14 kB)
Collecting flask-socketio==4.2.1
Downloading Flask_SocketIO-4.2.1-py2.py3-none-any.whl (16 kB)
Collecting requests<3.0,>=2.0
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting python_dateutil>=2.5.3
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting websocket-client==0.48.0
Downloading websocket_client-0.48.0-py2.py3-none-any.whl (198 kB)
Collecting ibm_cloud_sdk_core==1.0.0
Downloading ibm-cloud-sdk-core-1.0.0.tar.gz (19 kB)
Collecting itsdangerous>=0.24
Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting click>=5.1
Downloading click-8.0.1-py3-none-any.whl (97 kB)
Collecting Werkzeug>=0.15
Downloading Werkzeug-2.0.1-py3-none-any.whl (288 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)
Collecting Six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting python-socketio>=4.3.0
Downloading python_socketio-5.3.0-py2.py3-none-any.whl (53 kB)
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting PyJWT>=1.7.1
Downloading PyJWT-2.1.0-py3-none-any.whl (16 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl (30 kB)
Collecting bidict>=0.21.0
Downloading bidict-0.21.2-py2.py3-none-any.whl (37 kB)
Collecting python-engineio>=4.1.0
Downloading python_engineio-4.2.0-py2.py3-none-any.whl (51 kB)
Using legacy 'setup.py install' for ibm-watson, since package 'wheel' is not installed.
Using legacy 'setup.py install' for ibm-cloud-sdk-core, since package 'wheel' is not installed.
Installing collected packages: idna, certifi, urllib3, chardet, requests, Six, python-dateutil, websocket-client, PyJWT, ibm-cloud-sdk-core, ibm-watson, itsdangerous, click, Werkzeug, MarkupSafe, Jinja2, Flask, python-dotenv, flask-cors, bidict, python-engineio, python-socketio, flask-socketio
WARNING: The script chardetect is installed in '/tmp/contents018503308/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for ibm-cloud-sdk-core: started
Running setup.py install for ibm-cloud-sdk-core: finished with status 'done'
Running setup.py install for ibm-watson: started
Running setup.py install for ibm-watson: finished with status 'done'
WARNING: The script flask is installed in '/tmp/contents018503308/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script dotenv is installed in '/tmp/contents018503308/deps/0/python/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Flask-1.1.1 Jinja2-3.0.1 MarkupSafe-2.0.1 PyJWT-2.1.0 Six-1.16.0 Werkzeug-2.0.1 bidict-0.21.2 certifi-2021.5.30 chardet-4.0.0 click-8.0.1 flask-cors-3.0.8 flask-socketio-4.2.1 ibm-cloud-sdk-core-1.0.0 ibm-watson-4.0.1 idna-2.10 itsdangerous-2.0.1 python-dateutil-2.8.1 python-dotenv-0.10.3 python-engineio-4.2.0 python-socketio-5.3.0 requests-2.25.1 urllib3-1.26.5 websocket-client-0.48.0
Exit status 0
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (58.1M)
Uploaded droplet (61.2M)
Uploading complete
Cell 879700a2-564c-421c-9025-d97173c35f0b stopping instance 30eb0400-4a8d-42ce-9433-f2fddb747ec4
Cell 879700a2-564c-421c-9025-d97173c35f0b destroying container for instance 30eb0400-4a8d-42ce-9433-f2fddb747ec4
Cell 879700a2-564c-421c-9025-d97173c35f0b successfully destroyed container for instance 30eb0400-4a8d-42ce-9433-f2fddb747ec4

Waiting for app to start...
Start unsuccessful

TIP: use 'cf logs watson-voice-bot-20210618015210255 --recent' for more information
FAILED

Finished: FAILED

There is still a problem with the credentials. There is a known problem with the assistant and speech-to-text creds role. There is a workaround.

There is still a problem with the credentials. There is a known problem with the assistant and speech-to-text creds roles. There is a workaround that works for both.

Go to the Cloud Foundry App -> Runtime -> Environment Variables and add the Assistant and STT creds (APIKey and URL) using the same key/values described for use in the local runtime .env. We'll need to document this if we don't come up with an alternative.

Adding a screenshot here for now:

runtime_env

Originally posted by @markstur in #55 (comment)

Local Apikey authentification not implemented

Text to speech and speech to text apikeys are not loaded in the welcome.py

However .env authentification encourages to use them.
TEXTTOSPEECH_IAM_APIKEY=
SPEECHTOTEXT_IAM_APIKEY=

ValueError: authenticator must be provided

(mytestenv) C:\Users\Sarat\ana\watson-voice-bot>python app.py
INFO:engineio.server:Server initialized for threading.
Traceback (most recent call last):
File "app.py", line 128, in
assistant = AssistantV1(version="2019-11-06", authenticator=authenticator)
File "C:\Users\Sarat\ana\watson-voice-bot\mytestenv\lib\site-packages\ibm_watson\assistant_v1.py", line 81, in init
disable_ssl_verification=disable_ssl_verification)
File "C:\Users\Sarat\ana\watson-voice-bot\mytestenv\lib\site-packages\ibm_cloud_sdk_core\base_service.py", line 63, in init
raise ValueError('authenticator must be provided')
ValueError: authenticator must be provided

Error when deploy to ibm cloud

I followed your instructions to deploy to IBM cloud
getting error in Deploy Stage

Creating route watson-voice-bot.mybluemix.net...
OK

FAILED
Server error, status code: 400, error code: 210003, message: The host is taken: watson-voice-bot

Finished: FAILED

getUserMedia() no loner works with insecure origins

script.js:184 [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
init @ script.js:184
load (async)
(anonymous) @ script.js:169
script.js:190 No live audio input: SecurityError: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).
script.js:105 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
play @ script.js:105
(anonymous) @ script.js:88

Internal Server Error

I have succesfully deployed the app and got it working in Chrome, however when I speak to the app I get 'Internal Server Error' as the response with "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application." below.

I'm really very new to all this so can someone point me in the right direction to get this fixed?

Thanks.

Speech-to-text Listening issue

image
I have followed all the steps mentioned in Readme.nd and tried to deploy the code locally. I haven't installed any web socket yet.
With the default one, I am getting output as follows:
INFO:engineio.server:Server initialized for threading.
INFO:assistant_setup:Using WORKSPACE_ID=cd761ded-c1a9-476a-89c4-c6de53e00ce2
WARNING:werkzeug:WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance.

  • Serving Flask app "app" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
    INFO:werkzeug: * Running on http://192.168.29.211:5000/ (Press CTRL+C to quit)
    INFO:werkzeug:192.168.29.211 - - [17/Sep/2020 14:02:58] "GET /api/conversation HTTP/1.1" 200 -
    INFO:werkzeug:192.168.29.211 - - [17/Sep/2020 14:03:05] "POST /api/text-to-speech HTTP/1.1" 200 -

The program isn't working when the mic button is clicked it is just enabling the listening mode, after that webpage isn't responding anything. Kindly help me with this issue.

data/insurance.json file is missing

data/insurance.json file mentioned in "Run locally" procedure is missing in the repository and data/banking.json and data/skill-insurance-voice-bot.json exist instead.

https://github.com/IBM/watson-voice-bot/blob/master/doc/source/local.md

37: * Click the `Choose JSON File` button and choose the `data/insurance.json` file in your cloned watson-voice-bot repo.
38: * Make sure the `Everything` button is enabled.
39: * Click `Import`.
40: * Go back to the Skills page (use the left sidebar).
41: * Look for `insurance-voice-bot` card.

It looks line number 37 of the "Run locally" procedure should be modified as follows.

37: * Click the `Choose JSON File` button and choose the `data/skill-insurance-voice.json` file in your cloned watson-voice-bot repo.
38: * Make sure the `Everything` button is enabled.
39: * Click `Import`.
40: * Go back to the Skills page (use the left sidebar).
41: * Look for `insurance-voice-bot` card.

Error in pipeline when Deploying to Cloud Foundry

Getting this error during pipeline when using the Deploy To Cloud Foundry for watson-voice-bot:

Downloading app package...
Downloaded app package (1.6M)
-----> Python Buildpack version 1.7.10
-----> Supplying Python
ERROR Could not install python: no match found for 3.7.4 in [3.5.7 3.5.9 3.6.9 3.6.10 3.7.6 3.7.7 3.8.1 3.8.2]
Failed to compile droplet: Failed to run all supply scripts: exit status 14

I've found this re python-cloudpack:
“Could not install python: no match found for 3.7.4 in [ ... ]”
cloudfoundry/python-buildpack#158

Is there any quick hack/fix to make this Deploy To Cloud Foundry succeed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.