You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-30Lines changed: 14 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,54 +37,38 @@ $ mvn package
37
37
## Development and Debugging (ability to use Eclipse IDE)
38
38
**For deployment to a device (e.g. Raspberry Pi) the Maven build must be run from the command line (to create a correctly configured JAR)**
39
39
40
-
# Instructions for Eclipse
41
-
These instructions are for Eclipse, but those of you that use other IDE's can probably adapt to these instuctions.
40
+
For development and debugging - an `Eclipse project` has been created. Using a dedicated Java IDE like Eclipse can provide significant benefits during development (and especially debugging). The Eclipse project is configured to function as a Maven Project/Build. This means you can edit, build, and debug directly from Eclipse. Remote debugging is also possible. The Maven build is configured with debug information, so if you run the client on the Raspberry Pi in debug mode you can connect to it from Eclipse and debug interactively.
42
41
43
-
For development and debugging - an `Eclipse project` has been created. Find it as `.project` in the main folder.
42
+
An example command to run the client in remote debug mode is:
In Eclipse, simply configure a 'Debug Configuration' that specifies the IP address and port of the target and the main class: `Driver`
44
45
45
-
Using a dedicated Java IDE like Eclipse can provide significant benefits during development (and especially debugging). The Eclipse project is configured to function as a Maven Project/Build. This means you can edit, build, and debug directly from Eclipse. Remote debugging is also possible. The Maven build is configured with debug information, so if you run the client on the Raspberry Pi in debug mode you can connect to it from Eclipse and debug interactively.
46
+
The `start` directory contains startup scripts for both debug and non-debug modes.
46
47
47
-
Create a new workspace and import the project (as an existing Eclipse project).
48
+
If you are setting this up for the first time, it means you will need to create an Eclipse Workspace or use an existing Workspace. Import the Eclipse project from this directory into the Workspace.
48
49
49
-
You can run and debug the client within Eclipse - just set up a 'Run/Debug' configuration with the main class of 'Driver'.
50
-
51
-
To debug remotely on the Raspberry Pi:
52
-
An example command to run the client in remote debug mode is:
In Eclipse, simply configure a 'Debug Configuration' that specifies the IP address and port of the target and the main class: `Driver`
55
-
56
-
The `start` directory contains startup scripts for both debug and non-debug modes. These scripts can be copied to the `watson` directory on the device.
57
-
58
-
To Run/Debug directly from Eclipse (on the local machine) you will need to set up a local Run/Debug configuration. The main requirement for this is that you will need to indicate that the working directory is the `target/` directory and make sure that the config directory includes a properly configured `configure.properties` file (the Eclipse build does not put one there, so if a 'clean' build is performed there will not be a `configure.properties` file in the directory. If the `configure.properties` file doesn't exist in the `config` directory the client should announce that to you (a good test really...).
50
+
To Run/Debug directly from Eclipse (on the local machine) you will need to set up a local Run/Debug configuration. The main requirement for this is that you will need to indicate that the working directory is the `target/` directory and make sure that it includes a properly configured `configure.properties` file (the Eclipse build does not put one there, so if a 'clean' build is performed there will not be a `configure.properties` file in the directory. If the `configure.properties` file doesn't exist the client should announce that to you (a good test really...).
59
51
60
52
*(as we find and resolve problems with the Eclipse project, we will add to this section - for example, a 'clean' build will delete 'target', so we probably want a build step to copy a `configure.properties` in at the end of the build.)*
61
53
62
54
63
55
## Deploy
64
-
Our standard deployment to a device is into the ~/watson directory.
65
-
66
-
Copy the jar (created using the `maven package` command) from the `target/` directory on your local system to the device `~/watson` directory, e.g.
56
+
Copy the jar (created using the `maven package` command) from the `target/` directory to the device, e.g.
Copy `configure.properties.example` to `configure.properties` into the the `~/watson/config` directory of the device. Provide configuration and credential information and options by editing the following properties:
74
62
75
-
The `start` directory contains startup scripts for both debug and non-debug modes. These scripts can be copied to the `watson` directory on the device.
63
+
## Run
64
+
Copy `configure.properties.example` to `configure.properties` and copy it to the device `~/watson`. Provide configuration and credential information and options by editing the following properties:
76
65
77
66
### Required Connection Information
78
-
*`host` The URL of the Audio Gateway server (should NOT include the protocol prefix such as "https://")
79
-
*`IAMAPIKey` The client IAM API Key associated with the device in the IBM cloud IAM management system
80
-
*`skillset` The skillset to be used by this client
67
+
*`host` The URL of the server
68
+
*`header` The client ID associated with the device in the client database
69
+
*`key` The password, as established in the client database
81
70
82
71
### Optional Settings
83
-
84
-
#### Speech to text engine
85
-
The server supports two STT engines out of the box - Watson STT and Google STT
86
-
*`engine` - if you use the value `watson`, the server will use the Watson STT for converting audio to text, if you use `google` the server will use the Google STT. (default=google)
87
-
88
72
#### Audio Response via URL or Streaming
89
73
The server supports returning the response via an audio URL or by streaming the audio to the client.
90
74
*`urltts` (if `true` the server will respond with a URL, if `false` the server will stream the audio (using `audio_data` messages) - default=false)
Copy file name to clipboardExpand all lines: configure.properties.example
+2-14Lines changed: 2 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,10 @@
1
1
### Server connection parameters
2
2
host=<<endpoint-address>>
3
-
userID=<<user ID or client-id>>
4
-
3
+
header=<<client-id>>
4
+
key=<<client-password>>
5
5
# Used to make a non-SSL connection if testing on a server without SSL configured (locally). Default=false
6
6
#nossl=true
7
7
8
-
# IAM API Key is Used to authenticate the client device - created per IBM ID (or Service ID) using IBM Cloud
9
-
IAMAPIKey=
10
-
11
-
# Choosing which skill set to use (Required parameter)
12
-
skillset=
13
-
14
-
# Client language specific preferences can be passed (Optional parameter with a default value: en-US)
15
-
#language=en-US
16
-
17
-
# Choosing which STT and TTS engine to convert audio to text and text to audio - possible values are : watson, google , (Optional parameter with a default value : watson)
18
-
#engine=
19
-
20
8
### Controls playback method. Playback using an audio URL in the response [true], playback by streaming audio from the server [false]
LOG.debug(String.format(" Server sent a different response without a CARD - treat as STOP and play new response. Current-ID: %s Previous-ID: %s", currentAudioId, previousAudioId));
791
782
// Clear current audioId
792
783
previousAudioId = null;
793
-
794
-
// commented the next line as it was causing a bug - after 2-3 utterances the voice playbacks stops
795
-
//this.audioOutput.stop();
796
-
784
+
this.audioOutput.stop();
797
785
getSocketCommandProcessor().sendPlaybackStop();
798
786
// Don't enable the wake up trigger. End of playback will do it.
0 commit comments