-Speechly Client for Unity and .NET Standard 2.0 API
+Speechly Client Library for Unity and C#
Speechly is an API for building voice features into games, XR, applications and web sites. This client library streams audio from a Unity or .NET app to Speechly cloud API and provides a C# API for receiving real-time speech-to-text transcription and natural language understanding results.
Download speechly-client.unitypackage to get the latest Speechly Unity client library and example scenes bundled up for Unity.
Requirements
-A C# development environment conforming to .NET Standard 2.0 API
+ A C# development environment with .NET Standard 2.0 API:
Unity 2018.1 or later (tested with 2019.4.36f1 and 2021.2.12f1)
Microsoft .NET Core 3 or later (tested with .NET 6.0.200)
-Contents of this repository
-
-speechly-client-net-standard-2.0/ contains the Speechly client library code and a sample .NET console app.
-speechly-unity/Assets/Speechly/ folder contains the same basic .NET Speechly client code plus Unity-specific MicToSpeechly.cs microphone code and Unity sample projects:
+Getting Started with Unity
+Installation
-
+Download speechly-client.unitypackage
+Select Assets > Import Package > Custom Package... and select the downloaded file.
+Import Speechly/ folder from the package to your Unity project
+Drop MicToSpeechly prefab to your scene hierarchy
+Select it and enter a valid token in the App Id field
-Getting Started with Unity
-Import Speechly/ folder from speechly-client.unitypackage that contains code to use Speechly cloud API.
-
-If you want to skip straight to trying out a working sample scene, see more code examples below.
-
Unity example
The following code example streams a pre-recorded raw audio file (16 bit mono, 16000 samples/sec) to Speechly via the websocket API and logs speech and language recognition results to console.
Constructing SpeechlyClient requires an appId (or projectId) from Speechly Dashboard that determines which intents and keywords (entities) should be returned in addition to basic speech-to-text (ASR).
@@ -127,9 +120,9 @@ Unity example
await SpeechlyClient.Initialize(decoder);
// Send test audio. Callback(s) will fire and log the results.
- await client.StartContext();
+ await client.Start();
client.ProcessAudioFile("Assets/Speechly/00_chinese_restaurant.raw");
- await client.StopContext();
+ await client.Stop();
}
void Update()
@@ -139,7 +132,17 @@ Unity example
}
}
-More code examples
+Contents of this repository
+
MicToSpeechly
Import SpeechlyExamples/MicToSpeechly/ and Speechly/ folders from speechly-client.unitypackage to run a Unity sample scene that streams data from microphone to Speechly using MicToSpeechly.cs script running on a GameObject. App-specific logic is in UseSpeechly.cs which registers a callback and shows speech-to-text results in the UI.
VoiceCommands
@@ -155,9 +158,13 @@ Device testing
To diagnose problems with device builds, you can do the following:
First try running MicToSpeechlyScene.unity in the editor without errors.
-Change to Android player, set MicToSpeechlyScene.unity as the main scene and do a build and run to deploy the build to on a device.
-On terminal, do adb logcat -s Unity:D to follow Unity-related logs from the device.
-Run the app on device. Keep Hold to talk button pressed and say "ONE, TWO, THREE". Then release the button.
+Change to Android player, set MicToSpeechlyScene.unity as the main scene and do a build and run to deploy and start the build to on a device.
+On the terminal start following Unity-related log lines:
+
+adb logcat -s Unity:D
+
+
+Use the app on device. Ensure it's listening (e.g. keep Hold to talk button pressed) and say "ONE, TWO, THREE". Then release the button.
You should see "ONE, TWO, THREE" displayed in the top-left corner of the screen. If not, see the terminal for errors.
Android troubleshooting
@@ -191,7 +198,7 @@
diff --git a/docs/api/Speechly.SLUClient.AppTokenRequest.html b/docs/api/Speechly.SLUClient.AppTokenRequest.html
deleted file mode 100644
index 330366a..0000000
--- a/docs/api/Speechly.SLUClient.AppTokenRequest.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
Class AppTokenRequest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class AppTokenRequest
-
-
-
-
-
Inheritance
-
System.Object
-
AppTokenRequest
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class AppTokenRequest : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- appId
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- deviceId
-
-
- Declaration
-
-
public string deviceId
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.AudioTools.html b/docs/api/Speechly.SLUClient.AudioTools.html
deleted file mode 100644
index 5183dbc..0000000
--- a/docs/api/Speechly.SLUClient.AudioTools.html
+++ /dev/null
@@ -1,371 +0,0 @@
-
-
-
-
-
-
-
-
Class AudioTools
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class AudioTools
-
-
-
-
-
Inheritance
-
System.Object
-
AudioTools
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
-
-
-
public class AudioTools : object
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static int ConvertInt16ToFloat(in byte[] src, ref float[] dest, int srcStartSample = 0, int lengthSamples = null, int dstIndex = 0)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.Byte []
- src
-
-
-
- System.Single []
- dest
-
-
-
- System.Int32
- srcStartSample
-
-
-
- System.Int32
- lengthSamples
-
-
-
- System.Int32
- dstIndex
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static void Downsample(in float[] src, ref float[] dest, int sourceIndex = 0, int sourceLength = null, int destIndex = 0, int destLength = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.Single []
- src
-
-
-
- System.Single []
- dest
-
-
-
- System.Int32
- sourceIndex
-
-
-
- System.Int32
- sourceLength
-
-
-
- System.Int32
- destIndex
-
-
-
- System.Int32
- destLength
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static float GetAudioPeak(in float[] samples, int start = 0, int length = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.Single []
- samples
-
-
-
- System.Int32
- start
-
-
-
- System.Int32
- length
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static float GetEnergy(in float[] samples, int start = 0, int length = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.Single []
- samples
-
-
-
- System.Int32
- start
-
-
-
- System.Int32
- length
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.CloudDecoder.html b/docs/api/Speechly.SLUClient.CloudDecoder.html
index d498c65..027d9c8 100644
--- a/docs/api/Speechly.SLUClient.CloudDecoder.html
+++ b/docs/api/Speechly.SLUClient.CloudDecoder.html
@@ -10,7 +10,7 @@
-
+
@@ -75,8 +75,8 @@
Provides speech processing with Speechly's cloud SLU service.
Internally handles authentication using https and audio streaming via secure websocket.
-Audio is streamed when listening is started with SpeechlyClient.StartContext().
-Streaming stops upon call to SpeechlyClient.StopContext().
+Audio is streamed when listening is started with SpeechlyClient.Start().
+Streaming stops upon call to SpeechlyClient.Stop().
@@ -95,10 +95,10 @@
Constructors
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
CloudDecoder(String, String, String, String, Boolean)
@@ -159,10 +159,10 @@
Parameters
diff --git a/docs/api/Speechly.SLUClient.ConfigTool.html b/docs/api/Speechly.SLUClient.ConfigTool.html
deleted file mode 100644
index 6f640a5..0000000
--- a/docs/api/Speechly.SLUClient.ConfigTool.html
+++ /dev/null
@@ -1,308 +0,0 @@
-
-
-
-
-
-
-
-
Class ConfigTool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class ConfigTool
-
-
-
-
-
Inheritance
-
System.Object
-
ConfigTool
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
-
-
-
public class ConfigTool : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
- Declaration
-
-
public static string ConfigPath
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
- Declaration
-
-
public string deviceId
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static T RestoreOrCreate<T>(string ConfigFileName)
- where T : class, new()
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- ConfigFileName
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- T
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static void Save<T>(T configData, string ConfigFileName)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- T
- configData
-
-
-
- System.String
- ConfigFileName
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.EnergyTresholdVAD.html b/docs/api/Speechly.SLUClient.EnergyTresholdVAD.html
deleted file mode 100644
index e3b4867..0000000
--- a/docs/api/Speechly.SLUClient.EnergyTresholdVAD.html
+++ /dev/null
@@ -1,534 +0,0 @@
-
-
-
-
-
-
-
-
Class EnergyTresholdVAD
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class EnergyTresholdVAD
-
- Adaptive energy threshold voice activity detection (VAD) implementation.
-It can be used to enable hands-free operation of the SLU decoder.
-
When enough loud frames have been detected, VAD activates and calls StartContext automatically. When enough silent frames have been detected, the VAD deactivates after the sustain time and StopContext is called automatically. The background noise energy gradually adapts when VAD is not active.
-
Use its public field to configure minimum energy level, signal-to-noise ratio, minimum activation time and an activation/deactivation treshold (ratio of loud to silent frames).
-
-
-
-
Inheritance
-
System.Object
-
EnergyTresholdVAD
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class EnergyTresholdVAD : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- Enabled
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Boolean
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADActivation
-
-
- Declaration
-
-
public float VADActivation
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADControlListening
-
-
- Declaration
-
-
public bool VADControlListening
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Boolean
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADFrames
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADMinimumEnergy
-
-
- Declaration
-
-
public float VADMinimumEnergy
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADNoiseHalftimeMillis
-
-
- Declaration
-
-
public int VADNoiseHalftimeMillis
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADRelease
-
-
- Declaration
-
-
public float VADRelease
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADSignalToNoise
-
-
- Declaration
-
-
public float VADSignalToNoise
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- VADSustainMillis
-
-
- Declaration
-
-
public int VADSustainMillis
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
- Properties
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- BaselineEnergy
-
-
- Declaration
-
-
public float BaselineEnergy { get; }
-
- Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- Energy
-
-
- Declaration
-
-
public float Energy { get; }
-
- Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Single
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- IsSignalDetected
-
-
- Declaration
-
-
public bool IsSignalDetected { get; }
-
- Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Boolean
-
-
-
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- ProcessFrame(Single[], Int32, Int32)
-
-
- Declaration
-
-
public void ProcessFrame(float[] floats, int start = 0, int length = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.Single []
- floats
-
-
-
- System.Int32
- start
-
-
-
- System.Int32
- length
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.IDecoder.html b/docs/api/Speechly.SLUClient.IDecoder.html
index aa5b808..529ab26 100644
--- a/docs/api/Speechly.SLUClient.IDecoder.html
+++ b/docs/api/Speechly.SLUClient.IDecoder.html
@@ -10,7 +10,7 @@
-
+
@@ -95,10 +95,10 @@
Syntax
diff --git a/docs/api/Speechly.SLUClient.IntentFormatter.html b/docs/api/Speechly.SLUClient.IntentFormatter.html
deleted file mode 100644
index cb38091..0000000
--- a/docs/api/Speechly.SLUClient.IntentFormatter.html
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
-
-
-
-
Delegate IntentFormatter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate IntentFormatter
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
-
-
-
public delegate string IntentFormatter(string intent);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- intent
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.JSON.html b/docs/api/Speechly.SLUClient.JSON.html
deleted file mode 100644
index a771978..0000000
--- a/docs/api/Speechly.SLUClient.JSON.html
+++ /dev/null
@@ -1,393 +0,0 @@
-
-
-
-
-
-
-
-
Class JSON
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class JSON
-
-
-
-
-
Inheritance
-
System.Object
-
JSON
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class JSON : object
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- Parse<T>(String, T)
-
-
- Declaration
-
-
public static T Parse<T>(string json, T obj)
- where T : class
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- json
-
-
-
- T
- obj
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- T
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- ParseFromStream<T>(Stream, T)
-
-
- Declaration
-
-
public static T ParseFromStream<T>(Stream stream, T obj)
- where T : class
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- Stream
- stream
-
-
-
- T
- obj
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- T
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- Stringify<T>(T)
-
-
- Declaration
-
-
public static string Stringify<T>(T obj)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- T
- obj
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- StringifyToStream<T>(T)
-
-
- Declaration
-
-
public static MemoryStream StringifyToStream<T>(T obj)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- T
- obj
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- MemoryStream
-
-
-
-
- Type Parameters
-
-
-
- Name
- Description
-
-
-
-
- T
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.Logger.LoggerDelegate.html b/docs/api/Speechly.SLUClient.Logger.LoggerDelegate.html
deleted file mode 100644
index 340368a..0000000
--- a/docs/api/Speechly.SLUClient.Logger.LoggerDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate Logger.LoggerDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate Logger.LoggerDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void LoggerDelegate(string s);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgEntity.html b/docs/api/Speechly.SLUClient.MsgEntity.html
deleted file mode 100644
index 11bb32a..0000000
--- a/docs/api/Speechly.SLUClient.MsgEntity.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgEntity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgEntity
-
-
-
-
-
Inheritance
-
System.Object
-
MsgEntity
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class MsgEntity : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- data
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- Entity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgIntent.Data.html b/docs/api/Speechly.SLUClient.MsgIntent.Data.html
deleted file mode 100644
index 1dc33ae..0000000
--- a/docs/api/Speechly.SLUClient.MsgIntent.Data.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgIntent.Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgIntent.Data
-
-
-
-
-
Inheritance
-
System.Object
-
MsgIntent.Data
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class Data : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- intent
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgIntent.html b/docs/api/Speechly.SLUClient.MsgIntent.html
deleted file mode 100644
index fc46233..0000000
--- a/docs/api/Speechly.SLUClient.MsgIntent.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgIntent
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgIntent
-
-
-
-
-
Inheritance
-
System.Object
-
MsgIntent
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class MsgIntent : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- data
-
-
- Declaration
-
-
public MsgIntent.Data data
-
- Field Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgTentativeEntity.Data.html b/docs/api/Speechly.SLUClient.MsgTentativeEntity.Data.html
deleted file mode 100644
index 8792efb..0000000
--- a/docs/api/Speechly.SLUClient.MsgTentativeEntity.Data.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgTentativeEntity.Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgTentativeEntity.Data
-
-
-
-
-
Inheritance
-
System.Object
-
MsgTentativeEntity.Data
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class Data : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- entities
-
-
- Declaration
-
-
public Entity[] entities
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- Entity []
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgTentativeEntity.html b/docs/api/Speechly.SLUClient.MsgTentativeEntity.html
deleted file mode 100644
index eb5a4b3..0000000
--- a/docs/api/Speechly.SLUClient.MsgTentativeEntity.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgTentativeEntity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgTentativeEntity
-
-
-
-
-
Inheritance
-
System.Object
-
MsgTentativeEntity
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class MsgTentativeEntity : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- data
-
-
- Declaration
-
-
public MsgTentativeEntity.Data data
-
- Field Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgTentativeTranscript.Data.html b/docs/api/Speechly.SLUClient.MsgTentativeTranscript.Data.html
deleted file mode 100644
index 1741e60..0000000
--- a/docs/api/Speechly.SLUClient.MsgTentativeTranscript.Data.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgTentativeTranscript.Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgTentativeTranscript.Data
-
-
-
-
-
Inheritance
-
System.Object
-
MsgTentativeTranscript.Data
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class Data : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- transcript
-
-
- Declaration
-
-
public string transcript
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- words
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- Word []
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgTentativeTranscript.html b/docs/api/Speechly.SLUClient.MsgTentativeTranscript.html
deleted file mode 100644
index c20212f..0000000
--- a/docs/api/Speechly.SLUClient.MsgTentativeTranscript.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgTentativeTranscript
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgTentativeTranscript
-
-
-
-
-
Inheritance
-
System.Object
-
MsgTentativeTranscript
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class MsgTentativeTranscript : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- data
-
-
- Declaration
-
-
public MsgTentativeTranscript.Data data
-
- Field Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.MsgTranscript.html b/docs/api/Speechly.SLUClient.MsgTranscript.html
deleted file mode 100644
index d6a9176..0000000
--- a/docs/api/Speechly.SLUClient.MsgTranscript.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class MsgTranscript
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class MsgTranscript
-
-
-
-
-
Inheritance
-
System.Object
-
MsgTranscript
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class MsgTranscript : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- data
-
-
- Declaration
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- Word
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.Platform.html b/docs/api/Speechly.SLUClient.Platform.html
deleted file mode 100644
index 00f2368..0000000
--- a/docs/api/Speechly.SLUClient.Platform.html
+++ /dev/null
@@ -1,304 +0,0 @@
-
-
-
-
-
-
-
-
Class Platform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Platform
-
-
-
-
-
Inheritance
-
System.Object
-
Platform
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
-
-
-
public class Platform : object
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static Task<byte[]> Fetch(string url)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- url
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- Task <System.Byte []>
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static string GetDeviceId(string seed = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- seed
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static string GetPersistentStoragePath()
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
-
-
- Declaration
-
-
public static string GuidFromString(string s)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- s
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.Preferences.html b/docs/api/Speechly.SLUClient.Preferences.html
deleted file mode 100644
index 2c36698..0000000
--- a/docs/api/Speechly.SLUClient.Preferences.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
Class Preferences
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Preferences
-
-
-
-
-
Inheritance
-
System.Object
-
Preferences
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class Preferences : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- deviceId
-
-
- Declaration
-
-
public string deviceId
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- FileName
-
-
- Declaration
-
-
public static string FileName
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.ProjectTokenRequest.html b/docs/api/Speechly.SLUClient.ProjectTokenRequest.html
deleted file mode 100644
index 9695c61..0000000
--- a/docs/api/Speechly.SLUClient.ProjectTokenRequest.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
Class ProjectTokenRequest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class ProjectTokenRequest
-
-
-
-
-
Inheritance
-
System.Object
-
ProjectTokenRequest
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class ProjectTokenRequest : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- deviceId
-
-
- Declaration
-
-
public string deviceId
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- projectId
-
-
- Declaration
-
-
public string projectId
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.ResponseReceivedDelegate.html b/docs/api/Speechly.SLUClient.ResponseReceivedDelegate.html
deleted file mode 100644
index 0c0475a..0000000
--- a/docs/api/Speechly.SLUClient.ResponseReceivedDelegate.html
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
-
Delegate ResponseReceivedDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate ResponseReceivedDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void ResponseReceivedDelegate(MsgCommon msgCommon, string msgString);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- MsgCommon
- msgCommon
-
-
-
- System.String
- msgString
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.Segment.html b/docs/api/Speechly.SLUClient.Segment.html
index 1f8eaee..ba0257f 100644
--- a/docs/api/Speechly.SLUClient.Segment.html
+++ b/docs/api/Speechly.SLUClient.Segment.html
@@ -10,7 +10,7 @@
-
+
@@ -92,10 +92,10 @@
Constructors
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
Segment(String, Int32)
@@ -131,10 +131,10 @@
Fields
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
contextId
@@ -160,10 +160,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
entities
@@ -189,10 +189,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
id
@@ -218,10 +218,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
intent
@@ -247,10 +247,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
isFinal
@@ -276,10 +276,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
words
@@ -307,10 +307,10 @@
Methods
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
ToString()
@@ -337,10 +337,10 @@
Returns
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
ToString(BeautifyIntent, BeautifyEntity, String)
@@ -400,10 +400,10 @@
Returns
diff --git a/docs/api/Speechly.SLUClient.SegmentMessage.html b/docs/api/Speechly.SLUClient.SegmentMessage.html
deleted file mode 100644
index e0b02dc..0000000
--- a/docs/api/Speechly.SLUClient.SegmentMessage.html
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
-
-
-
-
-
Struct SegmentMessage
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Struct SegmentMessage
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public struct SegmentMessage
-
- Constructors
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- SegmentMessage(MsgCommon, String)
-
-
- Declaration
-
-
public SegmentMessage(MsgCommon msgCommon, string msgString)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- MsgCommon
- msgCommon
-
-
-
- System.String
- msgString
-
-
-
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- msgCommon
-
-
- Declaration
-
-
public MsgCommon msgCommon
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- MsgCommon
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
- msgString
-
-
- Declaration
-
-
public string msgString
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.IntentDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.IntentDelegate.html
deleted file mode 100644
index 394a6f5..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.IntentDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.IntentDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.IntentDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void IntentDelegate(MsgIntent msg);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- MsgIntent
- msg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.SegmentChangeDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.SegmentChangeDelegate.html
deleted file mode 100644
index 9ca3586..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.SegmentChangeDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.SegmentChangeDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.SegmentChangeDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void SegmentChangeDelegate(Segment segment);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- Segment
- segment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.StartContextDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.StartContextDelegate.html
deleted file mode 100644
index 38f70fe..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.StartContextDelegate.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.StartContextDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.StartContextDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void StartContextDelegate();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.StartStreamDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.StartStreamDelegate.html
deleted file mode 100644
index 7f27908..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.StartStreamDelegate.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.StartStreamDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.StartStreamDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void StartStreamDelegate();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.StopContextDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.StopContextDelegate.html
deleted file mode 100644
index d4ec574..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.StopContextDelegate.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.StopContextDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.StopContextDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void StopContextDelegate();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.StopStreamDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.StopStreamDelegate.html
deleted file mode 100644
index 4ac5701..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.StopStreamDelegate.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.StopStreamDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.StopStreamDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void StopStreamDelegate();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeEntityDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeEntityDelegate.html
deleted file mode 100644
index 579fe9e..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeEntityDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.TentativeEntityDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.TentativeEntityDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void TentativeEntityDelegate(MsgTentativeEntity msg);
-
- Parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeTranscriptDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeTranscriptDelegate.html
deleted file mode 100644
index 22428f0..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.TentativeTranscriptDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.TentativeTranscriptDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.TentativeTranscriptDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void TentativeTranscriptDelegate(MsgTentativeTranscript msg);
-
- Parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.TranscriptDelegate.html b/docs/api/Speechly.SLUClient.SpeechlyClient.TranscriptDelegate.html
deleted file mode 100644
index becf28d..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.TranscriptDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate SpeechlyClient.TranscriptDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate SpeechlyClient.TranscriptDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void TranscriptDelegate(MsgTranscript msg);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- MsgTranscript
- msg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClient.html b/docs/api/Speechly.SLUClient.SpeechlyClient.html
index a2cbd6c..ddd1c52 100644
--- a/docs/api/Speechly.SLUClient.SpeechlyClient.html
+++ b/docs/api/Speechly.SLUClient.SpeechlyClient.html
@@ -10,7 +10,7 @@
-
+
@@ -77,14 +77,14 @@
You can feed audio continuously, but control when to start and stop process speech with StartContext(String) and StopContext() or
-let voice activity detection (VAD) handle that automatically by passing EnergyTresholdVAD to SpeechlyClient constructor.
+
You can feed audio continuously, but control when to start and stop process speech with Start(String) and Stop() or
+let voice activity detection (VAD) handle that automatically by passing EnergyThresholdVAD to SpeechlyClient constructor.
@@ -102,19 +102,19 @@
Constructors
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
SpeechlyClient(Int32, Int32, Int32, Boolean, String, EnergyTresholdVAD, Boolean)
+
SpeechlyClient(Boolean, String, AudioInfo, Boolean)
Create a new SpeechlyClient to process audio and fire delegates to provide SLU results.
Declaration
-
public SpeechlyClient(int frameMillis = 30, int historyFrames = 5, int inputSampleRate = 16000, bool manualUpdate = false, string saveToFolder = null, EnergyTresholdVAD vad = null, bool debug = false)
+
public SpeechlyClient(bool manualUpdate = false, string saveToFolder = null, AudioInfo output = null, bool debug = false)
Parameters
@@ -126,24 +126,6 @@ Parameters
-
- System.Int32
- frameMillis
- Size of one audio frame (default: 30 ms). Total history duration will be historyFrames*frameSamples. History is sent upon StartContext to capture the start of utterance which especially important with VAD, which activates with a constant delay.
-
-
-
- System.Int32
- historyFrames
- Count of the audio history frames (default: 5). Total history duration will be historyFrames * frameSamples.
-
-
-
- System.Int32
- inputSampleRate
- Define the sample rate of incoming audio (default: 16000)
-
-
System.Boolean
manualUpdate
@@ -157,10 +139,9 @@ Parameters
- EnergyTresholdVAD
- vad
- EnergyTresholdVAD instance to control automatic listening on/off. Null disables VAD. (default: null)
-
+ AudioInfo
+ output
+
System.Boolean
@@ -174,10 +155,39 @@ Fields
|
- Improve this Doc
+ Improve this Doc
+
+
+ View Source
+
+ Debug
+
+
+ Declaration
+
+ Field Value
+
+
+
+ Type
+ Description
+
+
+
+
+ System.Boolean
+
+
+
+
+
+ |
+ Improve this Doc
- View Source
+ View Source
OnEntity
@@ -203,10 +213,10 @@ Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnIntent
@@ -232,14 +242,14 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnSegmentChange
Read the combined results of automatic speech recoginition (ASR) and natural language detection (NLU).
-
You can control when to start and stop process speech either manually with StartContext(String) and StopContext() or
+
You can control when to start and stop process speech either manually with Start(String) and Stop() or
automatically by providing a voice activity detection (VAD) field to SpeechlyClient .
@@ -264,17 +274,17 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
OnStartContext
+
OnStart
Declaration
-
public StartContextDelegate OnStartContext
+
public StartDelegate OnStart
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnStartStream
@@ -322,17 +332,17 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
OnStopContext
+
OnStop
Declaration
-
public StopContextDelegate OnStopContext
+
public StopDelegate OnStop
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnStopStream
@@ -380,10 +390,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnTentativeEntity
@@ -409,10 +419,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnTentativeIntent
@@ -438,10 +448,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnTentativeTranscript
@@ -467,10 +477,10 @@
Field Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
OnTranscript
@@ -498,10 +508,10 @@
Properties
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
@@ -528,10 +538,10 @@
Property Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
IsActive
@@ -558,10 +568,10 @@
Property Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
IsAudioStreaming
@@ -588,10 +598,10 @@
Property Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
IsReady
@@ -618,18 +628,18 @@
Property Value
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
-
SamplesSent
+
+
Output
Declaration
-
public int SamplesSent { get; }
+
public AudioInfo Output { get; }
Property Value
@@ -641,112 +651,56 @@ Property Value
- System.Int32
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
StreamSamplePos
-
-
-
Declaration
-
-
public int StreamSamplePos { get; }
-
-
Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
-
UtteranceSerial
-
-
-
Declaration
-
-
public int UtteranceSerial { get; }
-
-
Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
+ AudioInfo
+
Methods
+
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
-
Vad
-
+
+
AdjustAudioProcessor(Nullable<Boolean>)
+
Control AudioProcessor parameters.
+
Declaration
-
public EnergyTresholdVAD Vad { get; }
+
public void AdjustAudioProcessor(bool? vadControlsListening = null)
-
Property Value
+
Parameters
Type
+ Name
Description
- EnergyTresholdVAD
-
+ System.Nullable <System.Boolean >
+ vadControlsListening
+ true enables VAD to control listening. false disables VAD feature and stops listening immediately. null for no change.
+
-
Methods
-
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
Initialize(IDecoder)
+
Initialize(IDecoder, AudioProcessorOptions, ContextOptions, Boolean)
SLU decoder instance to use like CloudDecoder .
The SLU decoder provides the automatic speech recognition (ASR) and
natural language understanding (NLU) capabilities via SLU delegates (OnSegmentChange, OnTranscript...).
@@ -754,7 +708,7 @@
Declaration
-
public async Task Initialize(IDecoder decoder)
+
public async Task Initialize(IDecoder decoder, AudioProcessorOptions audioProcessorOptions = null, ContextOptions contextOptions = null, bool preferLibSpeechlyAudioProcessor = false)
Parameters
@@ -772,6 +726,21 @@ Parameters
SLU decoder implementing IDecoder interface like CloudDecoder .
+
+ AudioProcessorOptions
+ audioProcessorOptions
+
+
+
+ ContextOptions
+ contextOptions
+
+
+
+ System.Boolean
+ preferLibSpeechlyAudioProcessor
+
+
Returns
@@ -792,10 +761,10 @@
Returns
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
ProcessAudio(Stream)
@@ -824,23 +793,23 @@
Parameters
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
ProcessAudio(Single[], Int32, Int32, Boolean)
+
ProcessAudio(Single[], Int32, Int32)
Process speech audio samples from a microphone or other audio source.
It's recommended to constantly feed new audio as long as you want to use Speechly's SLU services.
-
You can control when to start and stop process speech either manually with StartContext(String) and StopContext() or
+
You can control when to start and stop process speech either manually with Start(String) and Stop() or
automatically by providing a voice activity detection (VAD) field to SpeechlyClient .
The audio is handled as follows:
Downsample to 16kHz if needed
Add to history ringbuffer
Calculate energy (VAD)
-Automatic Start/StopContext (VAD)
+Automatic Start/Stop (VAD)
Send utterance audio to a file
Send utterance audio to Speechly SLU decoder
@@ -848,7 +817,7 @@
Declaration
-
public void ProcessAudio(float[] floats, int start = 0, int length = null, bool forceSubFrameProcess = false)
+
public void ProcessAudio(float[] floats, int start = 0, int length = null)
Parameters
@@ -876,22 +845,16 @@ Parameters
System.Int32
length
Length of audio to process in samples or -1 to process the whole array (default: -1).
-
-
-
- System.Boolean
- forceSubFrameProcess
- StopStream(Boolean) internally uses this to force processing of last subframe at end of audio stream (default: false).
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
ProcessAudioFile(String)
@@ -920,10 +883,10 @@
Parameters
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
Shutdown()
@@ -952,21 +915,21 @@
Returns
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
-
StartContext(String)
+
+
Start(String)
Start listening for user speech and feeding it to the SLU decoder.
-OnContextStart is triggered upon a call to StartContext. It's also triggered by automatic VAD activation.
+
OnContextStart is triggered upon a call to Start. It's also triggered by automatic VAD activation.
You don't need to await this call if you don't need the utterance id.
Declaration
-
public Task<string> StartContext(string appId = null)
+
public Task<string> Start(string appId = null)
Parameters
@@ -1004,14 +967,14 @@ Returns
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
StartStream(String, Boolean)
-
StartStream should be called at start of a continuous audio stream. It resets the stream sample counters and history. For backwards compability, ProcessAudio and StartContext ensure it's been called.
+
StartStream should be called at start of a continuous audio stream. It resets the stream sample counters and history. For backwards compability, ProcessAudio and Start ensure it's been called.
OnStreamStart delegate is triggered upon a call to StartStream.
@@ -1043,21 +1006,21 @@
Parameters
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
-
-
StopContext()
+
+
Stop()
Stop listening for user speech.
-OnContextStop is triggered upon a call to StopContext. It's also triggered by automatic VAD deactivation.
+
OnContextStop is triggered upon a call to Stop. It's also triggered by automatic VAD deactivation.
You don't need to await this call if you don't need the utterance id.
Declaration
-
public Task<string> StopContext()
+
public Task<string> Stop()
Returns
@@ -1077,10 +1040,10 @@ Returns
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
StopStream(Boolean)
@@ -1111,10 +1074,10 @@
Parameters
|
- Improve this Doc
+ Improve this Doc
- View Source
+ View Source
Update()
@@ -1133,10 +1096,10 @@
Declaration
diff --git a/docs/api/Speechly.SLUClient.SpeechlyClientTest.html b/docs/api/Speechly.SLUClient.SpeechlyClientTest.html
deleted file mode 100644
index 0b64353..0000000
--- a/docs/api/Speechly.SLUClient.SpeechlyClientTest.html
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-
-
-
-
Class SpeechlyClientTest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class SpeechlyClientTest
-
-
-
-
-
Inheritance
-
System.Object
-
SpeechlyClientTest
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class SpeechlyClientTest : object
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- SplitWithVAD(String, String, String)
-
-
- Declaration
-
-
public static void SplitWithVAD(string fileName, string saveToFolder = null, string logUtteranceFolder = null)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- fileName
-
-
-
- System.String
- saveToFolder
-
-
-
- System.String
- logUtteranceFolder
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- TestCloudProcessing(String)
-
-
- Declaration
-
-
public static async Task TestCloudProcessing(string fileName)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- fileName
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- Task
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.TokenResponse.html b/docs/api/Speechly.SLUClient.TokenResponse.html
deleted file mode 100644
index fd26c4f..0000000
--- a/docs/api/Speechly.SLUClient.TokenResponse.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
Class TokenResponse
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class TokenResponse
-
-
-
-
-
Inheritance
-
System.Object
-
TokenResponse
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class TokenResponse : object
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- access_token
-
-
- Declaration
-
-
public string access_token
-
- Field Value
-
-
-
- Type
- Description
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.WsClient.ResponseReceivedDelegate.html b/docs/api/Speechly.SLUClient.WsClient.ResponseReceivedDelegate.html
deleted file mode 100644
index 9633df1..0000000
--- a/docs/api/Speechly.SLUClient.WsClient.ResponseReceivedDelegate.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
Delegate WsClient.ResponseReceivedDelegate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delegate WsClient.ResponseReceivedDelegate
-
-
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public delegate void ResponseReceivedDelegate(MemoryStream inputStream);
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- MemoryStream
- inputStream
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.WsClient.html b/docs/api/Speechly.SLUClient.WsClient.html
deleted file mode 100644
index 4f8110e..0000000
--- a/docs/api/Speechly.SLUClient.WsClient.html
+++ /dev/null
@@ -1,357 +0,0 @@
-
-
-
-
-
-
-
-
Class WsClient
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class WsClient
-
-
-
-
-
Inheritance
-
System.Object
-
WsClient
-
-
- Assembly : speechly-unity-net-standard-2.0.dll
- Syntax
-
-
public class WsClient : IDisposable
-
- Fields
-
-
- |
- Improve this Doc
-
-
- View Source
-
- OnResponseReceived
-
-
- Declaration
-
-
public WsClient.ResponseReceivedDelegate OnResponseReceived
-
- Field Value
-
- Properties
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- ReceiveBufferSize
-
-
- Declaration
-
-
public int ReceiveBufferSize { get; set; }
-
- Property Value
-
-
-
- Type
- Description
-
-
-
-
- System.Int32
-
-
-
-
- Methods
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- ConnectAsync(String, String)
-
-
- Declaration
-
-
public async Task ConnectAsync(string url, string authToken)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- url
-
-
-
- System.String
- authToken
-
-
-
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- Task
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- DisconnectAsync()
-
-
- Declaration
-
-
public async Task DisconnectAsync()
-
- Returns
-
-
-
- Type
- Description
-
-
-
-
- Task
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- Dispose()
-
-
- Declaration
-
-
public void Dispose()
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- SendBytes(ArraySegment<Byte>)
-
-
- Declaration
-
-
public void SendBytes(ArraySegment<byte> byteArraySegment)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- ArraySegment <System.Byte >
- byteArraySegment
-
-
-
-
-
- |
- Improve this Doc
-
-
- View Source
-
-
- SendText(String)
-
-
- Declaration
-
-
public void SendText(string text)
-
- Parameters
-
-
-
- Type
- Name
- Description
-
-
-
-
- System.String
- text
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/api/Speechly.SLUClient.html b/docs/api/Speechly.SLUClient.html
index f836f12..4e8f58d 100644
--- a/docs/api/Speechly.SLUClient.html
+++ b/docs/api/Speechly.SLUClient.html
@@ -10,7 +10,7 @@
-
+
@@ -80,14 +80,8 @@
diff --git a/docs/api/Speechly.SLUClient.EntityFormatter.html b/docs/api/Speechly.Tools.AudioProcessor.SendAudioDelegate.html
similarity index 71%
rename from docs/api/Speechly.SLUClient.EntityFormatter.html
rename to docs/api/Speechly.Tools.AudioProcessor.SendAudioDelegate.html
index 02f4f67..92f2119 100644
--- a/docs/api/Speechly.SLUClient.EntityFormatter.html
+++ b/docs/api/Speechly.Tools.AudioProcessor.SendAudioDelegate.html
@@ -5,12 +5,12 @@
-
Delegate EntityFormatter
+ Delegate AudioProcessor.SendAudioDelegate
-
-
+
@@ -68,18 +68,18 @@