0.1. Download and install gradle
>= 5.2.1 (IDEA may offer install it automatically) [#Install and setup Gradle](see this);
0.2. Download and install open-jdk
1.8 (IDEA may offer install it automatically) [#Install and setup Open-JDK](see this);
- Open IDEA and import downloaded
speech-to-text-demo
project; - Open
build.gradle
project and click button on emerged button (top right corner)Load Gradle Changes
; - After building project by
gradle
openDemoServer.java
file and try run it from code listing; - Into
Run/Debug Configurations
has been created new run configuration with nameDemoServer
; - Need add path (the best way specify absolut path) to
config/local.json
file as argument intoProgram arguments
field; - However, you must add Env-var
GOOGLE_APPLICATION_CREDENTIALS={path-to-project}/nodal-thunder-279319-7a4d2b6d03a6.json
intoEnvironment variables
field; - Open
config/local.json
file and specify path (the best way specify absolut path) tostatic-content
directory intostaticContentDir
field; - You can change other fields into this file if you really wanna it.
To install and setup gradle follow these steps:
- Download the latest Gradle distribution from https://gradle.org/releases
- Unpack the distribution
mkdir /opt/gradle && unzip -d /opt/gradle gradle-{version}-bin.zip
- Configure your system environment
export PATH=$PATH:/opt/gradle/gradle-{version}}/bin
To install and setup gradle from Intellij IDEA try these steps:
- File -> Settings -> "Build, Execution, Deployment" -> Build Tools -> Gradle;
- Into "Gradle user home" specify path to your gradle.
Another way! Look at bottom of current "Settings" window and find gradle frame. Select into "Build and run using" field - Intellij IDEA
To install JDK yourself just need:
- Download JDK kit needed version from this http://www.oracle.com/technetwork/java/javase/downloads/index.html and run installing;
- Run this command in terminal
sudo apt-get update && sudo apt-get install openjdk-{version}-jdk
;
To install JDK from Intellij IDEA try to do these steps:
- File -> Project Structure -> Platform Settings -> SDKs;
- Click on "+" and select "Download SDK";
- Into opened window select: Version: 1.8 Vendor: Amazon Corretto 1.8.0_302 Location: default
username: T3st0v
password: T3st0v
First important stage is login as test user!
Creates new archive and returns id, name and status.
request:
http://{address:port}/1/speechpad/create?model=default&name=test
response:
{
"speechpadId": "{id}",
"speechPadName": "test",
"success": true
}
P.S.: I dont really know whf is it - POST request but passing params into URL... OMG!
Returns all archives.
request:
http://{address:port}/1/speechpad/getAll
response:
{
"allSpeechpad": [
{
"name": "test",
"id": "{id}",
"transcriber": {
"model": "default",
"ready": false,
"transcribeResults": [],
"logger": {
"name": "RealtimeTranscriber"
}
}
}
],
"success": true
}
Returns archive object by specified id.
request:
http://{address:port}/1/speechpad/get?speechpad_id={id}
response:
{
"speechpad": {
"name": "test",
"id": "{id}",
"transcriber": {
"model": "default",
"ready": false,
"transcribeResults": [],
"logger": {
"name": "RealtimeTranscriber"
}
}
},
"success": true
}
Returns renamed archive object.
request:
http://{address:port}/1/speechpad/rename?speechpad_id={id}&new_name=test_new_name
response:
{
"newName": "test_new_name",
"speechpadId": "{id}",
"success": true
}
Removes archive object by specified id.
request:
http://{address:port}/1/speechpad/remove?speechpad_id={id}
response:
{
"success": true
}