commit
83675f5ad8
@ -16,9 +16,9 @@ DeepSpeech Class
|
||||
:members:
|
||||
|
||||
DeepSpeechStream Class
|
||||
----------------
|
||||
----------------------
|
||||
|
||||
.. doxygenclass:: DeepSpeechClient::DeepSpeechStream
|
||||
.. doxygenclass:: DeepSpeechClient::Models::DeepSpeechStream
|
||||
:project: deepspeech-dotnet
|
||||
:members:
|
||||
|
||||
|
29
doc/DotNet-Examples.rst
Normal file
29
doc/DotNet-Examples.rst
Normal file
@ -0,0 +1,29 @@
|
||||
.Net API Usage example
|
||||
======================
|
||||
|
||||
Examples are from `native_client/dotnet/DeepSpeechConsole/Program.cs`.
|
||||
|
||||
Creating a model instance and loading model
|
||||
-------------------------------------------
|
||||
|
||||
.. literalinclude:: ../native_client/dotnet/DeepSpeechConsole/Program.cs
|
||||
:language: csharp
|
||||
:linenos:
|
||||
:lineno-match:
|
||||
:start-after: sphinx-doc: csharp_ref_model_start
|
||||
:end-before: sphinx-doc: csharp_ref_model_stop
|
||||
|
||||
Performing inference
|
||||
--------------------
|
||||
|
||||
.. literalinclude:: ../native_client/dotnet/DeepSpeechConsole/Program.cs
|
||||
:language: csharp
|
||||
:linenos:
|
||||
:lineno-match:
|
||||
:start-after: sphinx-doc: csharp_ref_inference_start
|
||||
:end-before: sphinx-doc: csharp_ref_inference_stop
|
||||
|
||||
Full source code
|
||||
----------------
|
||||
|
||||
See :download:`Full source code<../native_client/dotnet/DeepSpeechConsole/Program.cs>`.
|
@ -104,7 +104,7 @@ language = None
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = ['.build', 'Thumbs.db', '.DS_Store']
|
||||
exclude_patterns = ['.build', 'Thumbs.db', '.DS_Store', 'node_modules']
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
@ -54,17 +54,19 @@ Welcome to DeepSpeech's documentation!
|
||||
|
||||
C-Examples
|
||||
|
||||
NodeJS-Examples
|
||||
DotNet-Examples
|
||||
|
||||
Java-Examples
|
||||
|
||||
NodeJS-Examples
|
||||
|
||||
Python-Examples
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contributed examples
|
||||
|
||||
DotNet-contrib-examples.rst
|
||||
DotNet-contrib-examples
|
||||
|
||||
NodeJS-contrib-Examples
|
||||
|
||||
|
@ -51,8 +51,10 @@ namespace CSharpExamples
|
||||
{
|
||||
Console.WriteLine("Loading model...");
|
||||
stopwatch.Start();
|
||||
// sphinx-doc: csharp_ref_model_start
|
||||
using (IDeepSpeech sttClient = new DeepSpeech(model ?? "output_graph.pbmm"))
|
||||
{
|
||||
// sphinx-doc: csharp_ref_model_stop
|
||||
stopwatch.Stop();
|
||||
|
||||
Console.WriteLine($"Model loaded - {stopwatch.Elapsed.Milliseconds} ms");
|
||||
@ -72,6 +74,7 @@ namespace CSharpExamples
|
||||
stopwatch.Start();
|
||||
|
||||
string speechResult;
|
||||
// sphinx-doc: csharp_ref_inference_start
|
||||
if (extended)
|
||||
{
|
||||
Metadata metaResult = sttClient.SpeechToTextWithMetadata(waveBuffer.ShortBuffer,
|
||||
@ -83,6 +86,7 @@ namespace CSharpExamples
|
||||
speechResult = sttClient.SpeechToText(waveBuffer.ShortBuffer,
|
||||
Convert.ToUInt32(waveBuffer.MaxSize / 2));
|
||||
}
|
||||
// sphinx-doc: csharp_ref_inference_stop
|
||||
|
||||
stopwatch.Stop();
|
||||
|
||||
@ -99,4 +103,4 @@ namespace CSharpExamples
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
breathe==4.13.1
|
||||
breathe==4.14.2
|
||||
semver==2.8.1
|
||||
sphinx==2.2.0
|
||||
sphinx==2.4.4
|
||||
sphinx-js==2.8
|
||||
sphinx-rtd-theme==0.4.3
|
||||
pygments==2.4.2
|
||||
pygments==2.6.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user