Skip to content

Commit

Permalink
update and add samples for SDK release 1.6 (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfma61 committed Jun 28, 2019
1 parent d79a4fa commit 6f53ae5
Show file tree
Hide file tree
Showing 230 changed files with 22,941 additions and 131 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ proguard-rules.pro text
*.js text
*.json text
*.m text
*.mat text
*.md text
*.meta text
*.pbxproj text
Expand All @@ -36,6 +37,7 @@ proguard-rules.pro text
*.py text
*.sln text
*.storyboard text
*.swift text
*.txt text
*.unity text
*.vcxproj text
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ This project hosts the **samples** for the Microsoft Cognitive Services Speech S
## News

Please check [here](https://aka.ms/csspeech/whatsnew) for release notes and older releases.

* Speech SDK Release 1.6.0

June 2019 we released version 1.6.0 of the Speech SDK.

* Speech SDK Release 1.5.1

Middle of May 2019 we released version 1.5.1 of the Speech SDK.
Expand All @@ -34,6 +39,10 @@ Please check [here](https://aka.ms/csspeech/whatsnew) for release notes and olde

Beginning of April 2019 we released version 1.4.0 of the Speech SDK.

* Speech SDK Release 1.3.1

End of February 2019 we released version 1.3.1 of the Speech SDK.

## Features

This repository hosts samples that help you to get started with several features of the SDK.
Expand Down Expand Up @@ -80,6 +89,7 @@ If you want to build them from scratch, please follow the articles in the Quicks
| [Quickstart Node.js](./quickstart/js-node/) | Node.js | Demonstrates one-shot speech recognition from a file. |
| [Quickstart Python](./quickstart/python/) | Windows, Linux, macOS | Demonstrates one-shot speech recognition from a microphone. |
| [Quickstart Objective-C](./quickstart/objectivec-ios/) | iOS | Demonstrates one-shot speech recognition from a file with recorded speech. |
| [Quickstart Swift](./quickstart/swift-ios/) | iOS | Demonstrates one-shot speech recognition from a microphone. |
| [Quickstart Objective-C](./quickstart/objectivec-macos/) | macOS | Demonstrates one-shot speech recognition from a microphone. |

### Speech translation quickstarts
Expand All @@ -91,7 +101,7 @@ If you want to build them from scratch, please follow the articles in the Quicks
| ---------- | -------- | ----------- |
| [Quickstart C++ for Windows](./quickstart/speech-translation/cpp-windows/) | Windows | Demonstrates one-shot speech translation/transcription from a microphone. |
| [Quickstart C# .NET Framework for Windows](./quickstart/speech-translation/csharp-dotnet-windows/) | Windows | Demonstrates one-shot speech translation/transcription from a microphone. |
| [Quickstart C# .NET Core ](./quickstart/speech-translation/csharp-dotnetcore/) | Windows, Linux, macOS | Demonstrates one-shot speech translation/transcription from a microphone. |
| [Quickstart C# .NET Core](./quickstart/speech-translation/csharp-dotnetcore/) | Windows, Linux, macOS | Demonstrates one-shot speech translation/transcription from a microphone. |
| [Quickstart C# UWP for Windows](./quickstart/speech-translation/csharp-uwp/) | Windows | Demonstrates one-shot speech translation/transcription from a microphone. |
| [Quickstart Java JRE](./quickstart/speech-translation/java-jre/) | Windows, Linux, macOS | Demonstrates one-shot speech translation/transcription from a microphone. |

Expand All @@ -105,14 +115,27 @@ If you want to build them from scratch, please follow the articles in the Quicks
| [Quickstart C++ for Linux](./quickstart/text-to-speech/cpp-linux/) | Linux | Demonstrates one-shot speech synthesis to the default speaker. |
| [Quickstart C++ for Windows](./quickstart/text-to-speech/cpp-windows/) | Windows | Demonstrates one-shot speech synthesis to the default speaker. |
| [Quickstart C# .NET for Windows](./quickstart/text-to-speech/csharp-dotnet-windows/) | Windows | Demonstrates one-shot speech synthesis to the default speaker. |
| [Quickstart C# UWP for Windows](./quickstart/text-to-speech/csharp-uwp/) | Windows | Demonstrates one-shot speech synthesis to the default speaker. |
| [Quickstart C# .NET Core](./quickstart/text-to-speech/csharp-dotnetcore/) | Windows, Linux | Demonstrates one-shot speech synthesis to the default speaker. |

### Voice-first virtual assistants quickstarts

The following quickstarts demonstrate how to create a custom voice-first virtual assistant (Preview).
The applications will connect to a previously authored bot configured to use the Direct Line Speech channel, send a voice request, and return a voice response activity (if configured).
If you want to build these quickstarts from scratch, please follow the articles in the Quickstart section on our [documentation page](https://aka.ms/csspeech).

| Quickstart | Platform | Description |
| ---------- | -------- | ----------- |
| [Quickstart Java JRE](./quickstart/virtual-assistant/java-jre) | Windows, Linux, macOS | Demonstrates speech recognition through the DialogServiceConnector and receiving activity responses. |
| [Quickstart C# UWP for Windows](./quickstart/virtual-assistant/csharp-uwp/) | Windows | Demonstrates speech recognition through the DialogServiceConnector and receiving activity responses. |

### Samples

The following samples demonstrate additional capabilities of the Speech SDK, such additional modes of speech recognition as well as intent recognition and translation:

| Sample | Platform | Description |
| --- | --- | --- |
| [C++ Console app for Windows](./samples/cpp/windows/console) | Windows | Demonstrates speech recognition, speech synthesis, intent recognition, and translation |
| [C++ Console app for Windows](./samples/cpp/windows/console) | Windows | Demonstrates speech recognition, speech synthesis, intent recognition, conversation transcription and translation |
| [C++ Speech Recognition from MP3/Opus file (Linux only)](./samples/cpp/linux/compressed-audio-input) | Linux | Demonstrates speech recognition from an MP3/Opus file |
| [C# Console app for .NET Framework on Windows](./samples/csharp/dotnet-windows/console) | Windows | Demonstrates speech recognition, speech synthesis, intent recognition, and translation |
| [C# Console app for .NET Core (Windows or Linux)](./samples/csharp/dotnetcore/console) | Windows, Linux, macOS | Demonstrates speech recognition, speech synthesis, intent recognition, and translation |
Expand All @@ -127,6 +150,10 @@ The following samples demonstrate additional capabilities of the Speech SDK, suc
| [Speech recognition and translation sample using JavaScript and Node.js](./samples/js/node) | Node.js | Demonstrates speech recognition, intent recognition, and translation |
| [Speech recognition sample for iOS using a connection object](./samples/objective-c/ios/README.md#connection-object-sample) | iOS | Demonstrates speech recognition |
| [Extended speech recognition sample for iOS](./samples/objective-c/ios/README.md#example-app-with-various-samples) | iOS | Demonstrates speech recognition using streams etc.|
| [C# UWP DialogServiceConnector sample for Windows](./samples/virtual-assistant/csharp-uwp/) | Windows | Demonstrates speech recognition through the DialogServiceConnector and receiving activity responses. |
| [C# Unity sample for Windows or Android](./samples/unity/speechrecognizer/) | Windows, Android | Demonstrates speech recognition, intent recognition, and translation for Unity |
| [C# Unity SpeechBotConnector sample for Windows](./samples/virtual-assistant/csharp-unity/) | Windows, Android | Demonstrates speech recognition through the SpeechBotConnector and receiving activity responses. |


Samples for using the Speech Service REST API (no Speech SDK installation required):

Expand Down
25 changes: 25 additions & 0 deletions ThirdPartyNotices.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,28 @@ The Cognitive Services Client Speech Samples are using code from the 'Gradle Pro
* See the License for the specific language governing permissions and
* limitations under the License.
*/

**b. JSON**

The Cognitive Services Client Speech Samples are using 'json - A really simple C# JSON Parser in 350 lines', obtained from https://github.com/zanders3/json. It is licensed under the [MIT License](https://github.com/zanders3/json/blob/master/LICENSE):

The MIT License (MIT)

Copyright (c) 2018 Alex Parker

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 2 additions & 2 deletions quickstart/cpp-windows/helloworld/helloworld.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<!-- N.B. the .targets extensions must be spelled out here -->
<Import Project="..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\native\Microsoft.CognitiveServices.Speech.targets" Condition="Exists('..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\native\Microsoft.CognitiveServices.Speech.targets')" />
<Import Project="..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\native\Microsoft.CognitiveServices.Speech.targets" Condition="Exists('..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\native\Microsoft.CognitiveServices.Speech.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\native\Microsoft.CognitiveServices.Speech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\native\Microsoft.CognitiveServices.Speech.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\native\Microsoft.CognitiveServices.Speech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\native\Microsoft.CognitiveServices.Speech.targets'))" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion quickstart/cpp-windows/helloworld/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CognitiveServices.Speech" version="1.5.1" targetFramework="native" />
<package id="Microsoft.CognitiveServices.Speech" version="1.6.0" targetFramework="native" />
</packages>
11 changes: 6 additions & 5 deletions quickstart/csharp-dotnet-windows/helloworld/helloworld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
Expand Down Expand Up @@ -74,8 +75,8 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CognitiveServices.Speech.csharp, Version=1.5.1.28, Culture=neutral, PublicKeyToken=d2e6dcccb609e663, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CognitiveServices.Speech.1.5.1\lib\net461\Microsoft.CognitiveServices.Speech.csharp.dll</HintPath>
<Reference Include="Microsoft.CognitiveServices.Speech.csharp, Version=1.6.0.28, Culture=neutral, PublicKeyToken=d2e6dcccb609e663, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CognitiveServices.Speech.1.6.0\lib\net461\Microsoft.CognitiveServices.Speech.csharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -95,12 +96,12 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\net461\Microsoft.CognitiveServices.Speech.targets" Condition="Exists('..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\net461\Microsoft.CognitiveServices.Speech.targets')" />
<Import Project="..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\net461\Microsoft.CognitiveServices.Speech.targets" Condition="Exists('..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\net461\Microsoft.CognitiveServices.Speech.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\net461\Microsoft.CognitiveServices.Speech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CognitiveServices.Speech.1.5.1\build\net461\Microsoft.CognitiveServices.Speech.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\net461\Microsoft.CognitiveServices.Speech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CognitiveServices.Speech.1.6.0\build\net461\Microsoft.CognitiveServices.Speech.targets'))" />
</Target>
<!-- N.B. the .targets extensions must be spelled out here -->
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CognitiveServices.Speech" version="1.5.1" targetFramework="net461" />
<package id="Microsoft.CognitiveServices.Speech" version="1.6.0" targetFramework="net461" />
</packages>
2 changes: 1 addition & 1 deletion quickstart/csharp-dotnetcore/helloworld/helloworld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.5.1" />
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.6.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion quickstart/csharp-uwp/helloworld/helloworld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CognitiveServices.Speech">
<Version>1.5.1</Version>
<Version>1.6.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.8</Version>
Expand Down
2 changes: 1 addition & 1 deletion quickstart/java-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// Speech SDK
implementation 'com.microsoft.cognitiveservices.speech:client-sdk:1.5.1'
implementation 'com.microsoft.cognitiveservices.speech:client-sdk:1.6.0'

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
Expand Down
2 changes: 1 addition & 1 deletion quickstart/java-jre/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>com.microsoft.cognitiveservices.speech</groupId>
<artifactId>client-sdk</artifactId>
<version>1.5.1</version>
<version>1.6.0</version>
</dependency>
</dependencies>
<!-- </dependencies> -->
Expand Down
4 changes: 2 additions & 2 deletions quickstart/js-node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quickstart/js-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "Microsoft",
"license": "MIT",
"dependencies": {
"microsoft-cognitiveservices-speech-sdk": "^1.5.0"
"microsoft-cognitiveservices-speech-sdk": "^1.6.0"
}
}
4 changes: 2 additions & 2 deletions quickstart/objectivec-ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ See the [accompanying article](https://docs.microsoft.com/azure/cognitive-servic
## Prerequisites

* A subscription key for the Speech service. See [Try the speech service for free](https://docs.microsoft.com/azure/cognitive-services/speech-service/get-started).
* A Mac with Xcode 9.4.1 or later installed as iOS development environment. This tutorial targets iOS versions 9.2 or later.
* A Mac with [Xcode](https://geo.itunes.apple.com/us/app/xcode/id497799835?mt=12) version 9.4.1 or later installed as iOS development environment. This tutorial targets iOS versions 9.2 or later.

## Get the Code for the Sample App

Expand All @@ -26,7 +26,7 @@ Next, add your subscription details to the `helloworld/ViewController.m` file:

1. Replace the string `YourSubscriptionKey` with your subscription key.

1. Replace the string `YourServiceRegion` with the [region](regions.md) associated with your subscription (for example, `westus` for the free trial subscription).
1. Replace the string `YourServiceRegion` with the [region](https://docs.microsoft.com/azure/cognitive-services/speech-service/regions) associated with your subscription (for example, `westus` for the free trial subscription).

To build the sample app and check if all the paths are set correctly, choose **Product** > **Build** from the menu.

Expand Down
5 changes: 3 additions & 2 deletions quickstart/objectivec-macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This sample demonstrates how to create a macOS app in Objective-C using the Cogn
## Prerequisites

* A subscription key for the Speech service. See [Try the speech service for free](https://docs.microsoft.com/azure/cognitive-services/speech-service/get-started).
* A macOS machine with [Xcode 9.4.1](https://geo.itunes.apple.com/us/app/xcode/id497799835?mt=12) or later and macOS 10.13 or later
* A macOS machine with [Xcode](https://geo.itunes.apple.com/us/app/xcode/id497799835?mt=12) version 9.4.1 or later and macOS 10.13 or later

## Get the Code for the Sample App

Expand All @@ -29,11 +29,12 @@ It can be used in Xcode projects as a [CocoaPod](https://cocoapods.org/), or dow
1. Open the `helloworld.xcworkspace` workspace in Xcode.
1. Make the following changes in the `AppDelegate.m` file:
1. Replace the string `YourSubscriptionKey` with your subscription key.
1. Replace the string `YourServiceRegion` with the [region](regions.md) associated with your subscription (for example, `westus` for the free trial subscription).
1. Replace the string `YourServiceRegion` with the [region](https://docs.microsoft.com/azure/cognitive-services/speech-service/regions) associated with your subscription (for example, `westus` for the free trial subscription).
1. Make the debug output visible (**View** > **Debug Area** > **Activate Console**).
1. Build and run the example code by selecting **Product** -> **Run** from the menu or clicking the **Play** button.
1. After you click the button in the app and say a few words, you should see the text you have spoken on the lower part of the screen. When you run the app for the first time, you should be prompted to give the app access to your computer's microphone.

## References

* [Quickstart article on the SDK documentation site](https://docs.microsoft.com/azure/cognitive-services/speech-service/quickstart-objective-c-macos)
* [Speech SDK API reference for Objective-C](https://aka.ms/csspeech/objectivecref)
Loading

0 comments on commit 6f53ae5

Please sign in to comment.