Skip to content

Commit ecadcce

Browse files
committed
Merged PR 45675: Release 0.13.38.2
1 parent fd77551 commit ecadcce

File tree

726 files changed

+25973
-15555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

726 files changed

+25973
-15555
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
* text=auto
12
*.sh text eol=lf

Directory.Build.props

+5-17
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,24 @@
66
<Company>Microsoft Corporation</Company>
77
<Owners>microsoft,psi</Owners>
88
<Authors>Microsoft</Authors>
9-
<AssemblyVersion>0.12.53.2</AssemblyVersion>
9+
<AssemblyVersion>0.13.38.2</AssemblyVersion>
1010
<FileVersion>$(AssemblyVersion)</FileVersion>
1111
<Version>$(AssemblyVersion)-beta</Version>
1212
<SignAssembly>false</SignAssembly>
13+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
1314
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
14-
<RepositoryUrl>http://github.com/microsoft/psi/</RepositoryUrl>
15+
<RepositoryUrl>https://github.com/microsoft/psi/</RepositoryUrl>
1516
<PackageProjectUrl>https://github.com/microsoft/psi/wiki</PackageProjectUrl>
1617
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
18+
<IncludeSymbols>true</IncludeSymbols>
19+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1720
<NeutralLanguage>en</NeutralLanguage>
1821
<PackageTags>Psi;Microsoft</PackageTags>
1922
<RepositoryType>git</RepositoryType>
20-
<IncludeSymbols>true</IncludeSymbols>
21-
<!-- Workaround for arbitrary value in AssemblyInformationalVersionAttribute until it is fixed in VS 16 https://github.com/Microsoft/visualfsharp/issues/4822 -->
22-
<NoWarn>FS2003</NoWarn>
2323
<LangVersion>latest</LangVersion>
2424
<RunCodeAnalysis>false</RunCodeAnalysis>
2525
</PropertyGroup>
2626

27-
<!-- Support for building in Visual Studio versions 15.9 and up -->
28-
<PropertyGroup Condition="'$(MSBuildVersion)' >= '15.9'">
29-
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
30-
</PropertyGroup>
31-
32-
<!-- Support for building in Visual Studio versions before 15.9 -->
33-
<PropertyGroup Condition="'$(MSBuildVersion)' &lt; '15.9'">
34-
<PackageLicenseUrl>https://raw.githubusercontent.com/Microsoft/psi/master/LICENSE.txt</PackageLicenseUrl>
35-
<!-- Disable licenseUrl deprecation warning in later versions of VS -->
36-
<NoWarn>NU5125</NoWarn>
37-
</PropertyGroup>
38-
3927
<ItemGroup>
4028
<!-- Include LICENSE.txt file as licenseUrl has been deprecated in NuGet -->
4129
<None Include="$(MSBuildThisFileDirectory)\LICENSE.txt" Pack="true" PackagePath="$(PackageLicenseFile)"/>

Psi.sln

+49-8
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.PsiStudio", "
124124
EndProject
125125
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Psi.PsiStudio", "Sources\Tools\PsiStudio\Test.Psi.PsiStudio\Test.Psi.PsiStudio.csproj", "{5600A9AF-934C-4225-B05D-F11DBC29E0FF}"
126126
EndProject
127-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Visualization.Common.Windows", "Sources\Visualization\Microsoft.Psi.Visualization.Common.Windows\Microsoft.Psi.Visualization.Common.Windows.csproj", "{D69636BA-CCE9-4A85-845E-A378A2B03D62}"
127+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Visualization.Windows", "Sources\Visualization\Microsoft.Psi.Visualization.Windows\Microsoft.Psi.Visualization.Windows.csproj", "{D69636BA-CCE9-4A85-845E-A378A2B03D62}"
128128
EndProject
129129
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Windows", "Sources\Runtime\Microsoft.Psi.Windows\Microsoft.Psi.Windows.csproj", "{B7C52FC7-9678-442B-9B1E-F19F09B05606}"
130130
EndProject
131-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Psi.Speech", "Sources\Speech\Test.Psi.Speech\Test.Psi.Speech.csproj", "{E951F93F-5915-47B2-850E-2F61775E322B}"
132-
EndProject
133131
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Psi.Visualization", "Sources\Visualization\Test.Psi.Visualization\Test.Psi.Visualization.csproj", "{3F40EF71-126D-4D2B-84DB-37A574091B13}"
134132
EndProject
135133
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCVSample", "Samples\OpenCVSample\OpenCVSample\OpenCVSample.csproj", "{A04D4DFC-2843-4BC4-96A0-F03631700506}"
@@ -149,6 +147,9 @@ EndProject
149147
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Imaging.Linux", "Sources\Imaging\Microsoft.Psi.Imaging.Linux\Microsoft.Psi.Imaging.Linux.csproj", "{B9F00634-88A1-40EF-9DAD-814A307AD81F}"
150148
EndProject
151149
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Psi.Windows", "Sources\Runtime\Test.Psi.Windows\Test.Psi.Windows.csproj", "{BE194924-7162-405D-BF6E-E6086BAA12F1}"
150+
ProjectSection(ProjectDependencies) = postProject
151+
{2CC39BCB-7798-474C-AC97-1C5F664101E2} = {2CC39BCB-7798-474C-AC97-1C5F664101E2}
152+
EndProjectSection
152153
EndProject
153154
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfSample", "Samples\WpfSample\WpfSample.csproj", "{65DF8A90-AF28-4F59-BF48-AF1E681397A4}"
154155
EndProject
@@ -206,6 +207,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureKinectSample", "Sample
206207
EndProject
207208
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Kinect.Visualization.Windows", "Sources\Kinect\Microsoft.Psi.Kinect.Visualization.Windows\Microsoft.Psi.Kinect.Visualization.Windows.csproj", "{F31606FF-3737-45DC-8E89-6256AACD841F}"
208209
EndProject
210+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.LiveCharts.Visualization.Windows", "Sources\Visualization\Microsoft.Psi.LiveCharts.Visualization.Windows\Microsoft.Psi.LiveCharts.Visualization.Windows.csproj", "{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A}"
211+
EndProject
212+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Onnx", "Onnx", "{EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}"
213+
EndProject
214+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Onnx.Cpu", "Sources\Integrations\Onnx\Microsoft.Psi.Onnx.Cpu\Microsoft.Psi.Onnx.Cpu.csproj", "{D18F494B-3639-4094-BD5E-BE8D81D5CD39}"
215+
EndProject
216+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Onnx.Gpu", "Sources\Integrations\Onnx\Microsoft.Psi.Onnx.Gpu\Microsoft.Psi.Onnx.Gpu.csproj", "{CAE417E8-0E2D-499D-B11D-78A95155AF8A}"
217+
EndProject
218+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Onnx.ModelRunners.Cpu", "Sources\Integrations\Onnx\Microsoft.Psi.Onnx.ModelRunners.Cpu\Microsoft.Psi.Onnx.ModelRunners.Cpu.csproj", "{D649D56B-777C-4246-8D59-C32749D94D39}"
219+
EndProject
220+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Onnx.ModelRunners.Gpu", "Sources\Integrations\Onnx\Microsoft.Psi.Onnx.ModelRunners.Gpu\Microsoft.Psi.Onnx.ModelRunners.Gpu.csproj", "{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91}"
221+
EndProject
222+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Psi.Onnx", "Sources\Integrations\Onnx\Test.Psi.Onnx\Test.Psi.Onnx.csproj", "{A0677BEA-ADB1-4950-89E6-89483D621A52}"
223+
EndProject
209224
Global
210225
GlobalSection(SolutionConfigurationPlatforms) = preSolution
211226
Debug|Any CPU = Debug|Any CPU
@@ -348,10 +363,6 @@ Global
348363
{B7C52FC7-9678-442B-9B1E-F19F09B05606}.Debug|Any CPU.Build.0 = Debug|Any CPU
349364
{B7C52FC7-9678-442B-9B1E-F19F09B05606}.Release|Any CPU.ActiveCfg = Release|Any CPU
350365
{B7C52FC7-9678-442B-9B1E-F19F09B05606}.Release|Any CPU.Build.0 = Release|Any CPU
351-
{E951F93F-5915-47B2-850E-2F61775E322B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
352-
{E951F93F-5915-47B2-850E-2F61775E322B}.Debug|Any CPU.Build.0 = Debug|Any CPU
353-
{E951F93F-5915-47B2-850E-2F61775E322B}.Release|Any CPU.ActiveCfg = Release|Any CPU
354-
{E951F93F-5915-47B2-850E-2F61775E322B}.Release|Any CPU.Build.0 = Release|Any CPU
355366
{3F40EF71-126D-4D2B-84DB-37A574091B13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
356367
{3F40EF71-126D-4D2B-84DB-37A574091B13}.Debug|Any CPU.Build.0 = Debug|Any CPU
357368
{3F40EF71-126D-4D2B-84DB-37A574091B13}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -460,6 +471,30 @@ Global
460471
{F31606FF-3737-45DC-8E89-6256AACD841F}.Debug|Any CPU.Build.0 = Debug|Any CPU
461472
{F31606FF-3737-45DC-8E89-6256AACD841F}.Release|Any CPU.ActiveCfg = Release|Any CPU
462473
{F31606FF-3737-45DC-8E89-6256AACD841F}.Release|Any CPU.Build.0 = Release|Any CPU
474+
{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
475+
{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
476+
{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
477+
{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A}.Release|Any CPU.Build.0 = Release|Any CPU
478+
{D18F494B-3639-4094-BD5E-BE8D81D5CD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
479+
{D18F494B-3639-4094-BD5E-BE8D81D5CD39}.Debug|Any CPU.Build.0 = Debug|Any CPU
480+
{D18F494B-3639-4094-BD5E-BE8D81D5CD39}.Release|Any CPU.ActiveCfg = Release|Any CPU
481+
{D18F494B-3639-4094-BD5E-BE8D81D5CD39}.Release|Any CPU.Build.0 = Release|Any CPU
482+
{CAE417E8-0E2D-499D-B11D-78A95155AF8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
483+
{CAE417E8-0E2D-499D-B11D-78A95155AF8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
484+
{CAE417E8-0E2D-499D-B11D-78A95155AF8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
485+
{CAE417E8-0E2D-499D-B11D-78A95155AF8A}.Release|Any CPU.Build.0 = Release|Any CPU
486+
{D649D56B-777C-4246-8D59-C32749D94D39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
487+
{D649D56B-777C-4246-8D59-C32749D94D39}.Debug|Any CPU.Build.0 = Debug|Any CPU
488+
{D649D56B-777C-4246-8D59-C32749D94D39}.Release|Any CPU.ActiveCfg = Release|Any CPU
489+
{D649D56B-777C-4246-8D59-C32749D94D39}.Release|Any CPU.Build.0 = Release|Any CPU
490+
{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
491+
{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91}.Debug|Any CPU.Build.0 = Debug|Any CPU
492+
{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91}.Release|Any CPU.ActiveCfg = Release|Any CPU
493+
{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91}.Release|Any CPU.Build.0 = Release|Any CPU
494+
{A0677BEA-ADB1-4950-89E6-89483D621A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
495+
{A0677BEA-ADB1-4950-89E6-89483D621A52}.Debug|Any CPU.Build.0 = Debug|Any CPU
496+
{A0677BEA-ADB1-4950-89E6-89483D621A52}.Release|Any CPU.ActiveCfg = Release|Any CPU
497+
{A0677BEA-ADB1-4950-89E6-89483D621A52}.Release|Any CPU.Build.0 = Release|Any CPU
463498
EndGlobalSection
464499
GlobalSection(SolutionProperties) = preSolution
465500
HideSolutionNode = FALSE
@@ -518,7 +553,6 @@ Global
518553
{5600A9AF-934C-4225-B05D-F11DBC29E0FF} = {0E72598E-2A93-4439-B732-8763CD99F2C3}
519554
{D69636BA-CCE9-4A85-845E-A378A2B03D62} = {2CA9B0AD-E127-47A6-AF23-D567C64FBA79}
520555
{B7C52FC7-9678-442B-9B1E-F19F09B05606} = {3F77CC04-2E58-452B-8107-0C93E7944D4E}
521-
{E951F93F-5915-47B2-850E-2F61775E322B} = {BABB7492-D236-4F1E-81C8-AB300CE1AD84}
522556
{3F40EF71-126D-4D2B-84DB-37A574091B13} = {2CA9B0AD-E127-47A6-AF23-D567C64FBA79}
523557
{A04D4DFC-2843-4BC4-96A0-F03631700506} = {BED75944-5B42-45E4-8347-46CEEEFC865F}
524558
{0C0D11F0-04C4-41D3-AF43-7C2ACA90214A} = {BED75944-5B42-45E4-8347-46CEEEFC865F}
@@ -549,6 +583,13 @@ Global
549583
{C91D0412-1BB2-40D2-8DCA-A48B6C5B7E67} = {CB8286F5-167B-4416-8FE9-9B97FCF146D5}
550584
{66639311-E7BE-4A5B-A35B-9BFF6D3F69F2} = {1AA38339-B349-4AA7-A0A9-F92ADCFDB2DF}
551585
{F31606FF-3737-45DC-8E89-6256AACD841F} = {CB8286F5-167B-4416-8FE9-9B97FCF146D5}
586+
{5AC206E0-6B2E-4DBC-9B8A-74A47C907C6A} = {2CA9B0AD-E127-47A6-AF23-D567C64FBA79}
587+
{EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4} = {916962DE-E7D5-4FBB-8B62-42872488ED9E}
588+
{D18F494B-3639-4094-BD5E-BE8D81D5CD39} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
589+
{CAE417E8-0E2D-499D-B11D-78A95155AF8A} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
590+
{D649D56B-777C-4246-8D59-C32749D94D39} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
591+
{8B4F93E0-86D7-474C-8DD5-14E0AAD8BF91} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
592+
{A0677BEA-ADB1-4950-89E6-89483D621A52} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
552593
EndGlobalSection
553594
GlobalSection(ExtensibilityGlobals) = postSolution
554595
SolutionGuid = {EAF15EE9-DCC5-411B-A9E5-7C2F3D132331}

Samples/AzureKinectSample/README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ This component consumes `DepthImage` and `InfraredImage` streams as well as a th
333333
For instace, assuming these streams were persisted into a store, we can open them up as follows:
334334

335335
```csharp
336-
var store = Store.Open(pipeline, "MyRecording", @"C:\Data");
336+
var store = PsiStore.Open(pipeline, "MyRecording", @"C:\Data");
337337
var depth = store.OpenStream<Shared<DepthImage>>("DepthImage"); // DepthImage
338338
var infrared = store.OpenStream<Shared<Image>>("InfraredStream"); // ColorImage
339339
var calibration = store.OpenStream<Calibration>("AzureKinectSensorCalibration"); // AzureKinectSensorCalibration
@@ -346,4 +346,16 @@ depth.Join(infrared).PipeTo(bodyTracker);
346346
calibration.PipeTo(bodyTracker.AzureKinectSensorCalibration);
347347

348348
var bodies = bodyTracker.Bodies;
349-
```
349+
```
350+
351+
## A Note About Coordinate Systems
352+
353+
The `AzureKinectBodyTracker` and `AzureKinectSensor` components emit all calibration, joint, and body orientation information in the coordinate system basis of MathNet.Spatial. This is a different basis assumption from that used by the sensor technology underneath for [joints](https://docs.microsoft.com/en-us/azure/Kinect-dk/body-joints) and for the [sensor itself](https://docs.microsoft.com/en-us/azure/Kinect-dk/coordinate-systems).
354+
355+
All coordinate systems are immediately rebased inside the component such that the X-axis represents "forward", the Y-axis represents "left", and Z-axis represents "up". All coordinate system information emitted by these components adhere to this basis.
356+
357+
Z
358+
| X
359+
| /
360+
| /
361+
Y <----+

Samples/KinectSample/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private void PerformMultiModalSpeechDetection()
152152

153153
// Create store for the data. Live Visualizer can only read data from a store.
154154
var pathToStore = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
155-
Microsoft.Psi.Data.Exporter store = Store.Create(pipeline, ApplicationName, pathToStore);
155+
var store = PsiStore.Create(pipeline, ApplicationName, pathToStore);
156156

157157
mouthOpen.Select(v => v ? 1d : 0d).Write("MouthOpen", store);
158158

@@ -163,7 +163,7 @@ private void PerformMultiModalSpeechDetection()
163163
kinectSensor.Audio.Write("Audio", store);
164164

165165
var images = kinectSensor.ColorImage.EncodeJpeg(90, DeliveryPolicy.LatestMessage).Out;
166-
Store.Write(images, "Images", store, true, DeliveryPolicy.LatestMessage);
166+
images.Write("Images", store, true, DeliveryPolicy.LatestMessage);
167167

168168
landmarks.Write("FaceLandmarks", store);
169169

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
4+
namespace Microsoft.Psi.Samples.LinuxSpeechSample
5+
{
6+
using System;
7+
using Microsoft.CognitiveServices.Speech;
8+
using Microsoft.CognitiveServices.Speech.Audio;
9+
using Microsoft.Psi;
10+
using Microsoft.Psi.Audio;
11+
using Microsoft.Psi.Components;
12+
13+
/// <summary>
14+
/// Component that wraps the Azure Cognitive Services speech recognizer.
15+
/// </summary>
16+
public class ContinuousSpeechRecognizer : ConsumerProducer<AudioBuffer, string>, ISourceComponent, IDisposable
17+
{
18+
private readonly PushAudioInputStream pushStream;
19+
private readonly AudioConfig audioInput;
20+
private readonly SpeechRecognizer recognizer;
21+
22+
/// <summary>
23+
/// Initializes a new instance of the <see cref="ContinuousSpeechRecognizer"/> class.
24+
/// </summary>
25+
/// <param name="pipeline">The pipeline in which to create the component.</param>
26+
/// <param name="subscriptionKey">The subscription key for the Azure speech resource.</param>
27+
/// <param name="region">The service region of the Azure speech resource.</param>
28+
public ContinuousSpeechRecognizer(Pipeline pipeline, string subscriptionKey, string region)
29+
: base(pipeline)
30+
{
31+
var config = SpeechConfig.FromSubscription(subscriptionKey, region);
32+
this.pushStream = AudioInputStream.CreatePushStream();
33+
this.audioInput = AudioConfig.FromStreamInput(this.pushStream);
34+
this.recognizer = new SpeechRecognizer(config, this.audioInput);
35+
}
36+
37+
/// <inheritdoc/>
38+
public void Start(Action<DateTime> notifyCompletionTime)
39+
{
40+
this.recognizer.Recognized += this.Recognizer_Recognized;
41+
this.recognizer.StartContinuousRecognitionAsync().Wait();
42+
notifyCompletionTime(DateTime.MaxValue);
43+
}
44+
45+
/// <inheritdoc/>
46+
public void Stop(DateTime finalOriginatingTime, Action notifyCompleted)
47+
{
48+
this.recognizer.Recognized -= this.Recognizer_Recognized;
49+
this.pushStream.Close();
50+
this.recognizer.StopContinuousRecognitionAsync().Wait();
51+
notifyCompleted();
52+
}
53+
54+
/// <inheritdoc/>
55+
public void Dispose()
56+
{
57+
this.recognizer.Dispose();
58+
this.audioInput.Dispose();
59+
this.pushStream.Dispose();
60+
}
61+
62+
/// <inheritdoc/>
63+
protected override void Receive(AudioBuffer data, Envelope envelope)
64+
{
65+
this.pushStream.Write(data.Data);
66+
}
67+
68+
/// <summary>
69+
/// Handler for the speech recognized event from the recognizer. Posts the recognized text to the output.
70+
/// </summary>
71+
private void Recognizer_Recognized(object sender, SpeechRecognitionEventArgs e)
72+
{
73+
var originatingTime = this.Out.Pipeline.StartTime.AddTicks((long)e.Offset) + e.Result.Duration;
74+
this.Out.Post(e.Result.Text, originatingTime);
75+
}
76+
}
77+
}

Samples/LinuxSpeechSample/LinuxSpeechSample.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<CodeAnalysisRuleSet>../../Build/Sample.Psi.ruleset</CodeAnalysisRuleSet>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111
<WarningsAsErrors />
12-
<DocumentationFile>bin\Release\netcoreapp3.1\LinuxSpeechSample.xml</DocumentationFile>
12+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1313
</PropertyGroup>
1414

1515
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1616
<CodeAnalysisRuleSet>../../Build/Sample.Psi.ruleset</CodeAnalysisRuleSet>
1717
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1818
<WarningsAsErrors />
19-
<DocumentationFile>bin\Debug\netcoreapp3.1\LinuxSpeechSample.xml</DocumentationFile>
19+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2020
</PropertyGroup>
2121

2222
<ItemGroup>
@@ -29,14 +29,14 @@
2929

3030
<ItemGroup>
3131
<ProjectReference Include="..\..\Sources\Audio\Microsoft.Psi.Audio.Linux\Microsoft.Psi.Audio.Linux.csproj" />
32-
<ProjectReference Include="..\..\Sources\Integrations\CognitiveServices\Microsoft.Psi.CognitiveServices.Speech\Microsoft.Psi.CognitiveServices.Speech.csproj" />
3332
</ItemGroup>
3433

3534
<ItemGroup>
3635
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
3736
<PrivateAssets>all</PrivateAssets>
3837
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3938
</PackageReference>
39+
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.13.0" />
4040
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
4141
</ItemGroup>
4242

0 commit comments

Comments
 (0)