Python speech sample (#5322)

* Upload python speech sample draft

* Add function doc strings

* Add the ability to save results to a file

* Add a plugin configuration for GNA to get better accuracy

* Add errors calculation (comparison with a reference)

* Fix flake8 issues

* Add ability to run in hetero mode

* Add ability to load and save numpy format files (.npz)

* Add an error for wrong file extensions & update help message

* Add import and export GNA model options

* Add -we option to export embedded gna model

* Add readme

* Add -oname command line option (Layer names for output blobs)

* Add -iname command line option (Layer names for input blobs)

* Add info about -iname option to README.md

* doc: update readme, fix style

* Add a state reset between inferences

* add reset API to speech README

* doc: remove extra output from README

* remove onnx and TODO, format output

* Add an else branch to the if statement that checks a utterance data type

* Add dummy data for inference if a number of vectors < batch size

* Split the sample into separte files

Co-authored-by: Kate Generalova <kate.generalova@intel.com>
This commit is contained in:
Dmitry PigasinandKate Generalova authored and GitHub committed 2021-06-01 12:48:02 +03:00
1 parent d40636f835
commit b2abf25218
8 files changed
+613 -5

No files matched your search

@@ -22,7 +22,7 @@ Basic Inference Engine API is covered by [Hello Classification C++ sample](../he
| Options | Values |
|:--- |:---
| Validated Models | Acoustic model based on Kaldi\* neural networks (see [Model Preparation](#model-preparation) section)
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx)
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin)
| Supported devices | See [Execution Modes](#execution-modes) section below and [List Supported Devices](../../../docs/IE_DG/supported_plugins/Supported_Devices.md) |
## How It Works
@@ -164,8 +164,7 @@ All of them can be downloaded from [https://storage.openvinotoolkit.org/models_c
> **NOTES**:
>
> - Before running the sample with a trained model, make sure the model is converted to the Inference Engine format (\*.xml + \*.bin) using the [Model Optimizer tool](../../../docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
>
> - The sample accepts models in ONNX format (.onnx) that do not require preprocessing.
## Sample Output
@@ -681,7 +681,7 @@ int main(int argc, char* argv[]) {
std::cout << ie.GetVersions(deviceStr) << std::endl;
// -----------------------------------------------------------------------------------------------------
// --------------------------- Step 2. Read a model in OpenVINO Intermediate Representation (.xml and .bin files) or ONNX (.onnx file) format
// --------------------------- Step 2. Read a model in OpenVINO Intermediate Representation (.xml and .bin files)
slog::info << "Loading network files:" << slog::endl << FLAGS_m << slog::endl;
uint32_t batchSize = (FLAGS_cw_r > 0 || FLAGS_cw_l > 0) ? 1 : (uint32_t)FLAGS_bs;