Skip to content

Commit 032ebdc

Browse files
authored
Merge pull request #374 from watson-developer-cloud/6675-speech-to-text-v1-examples
Add Speech to Text V1 examples
2 parents 9c839e3 + 7d60f94 commit 032ebdc

File tree

10 files changed

+1002
-16
lines changed

10 files changed

+1002
-16
lines changed

IBM.Watson.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBM.Watson.Discovery.v1.Exa
105105
EndProject
106106
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBM.Watson.LanguageTranslator.v3.Examples", "examples\IBM.Watson.LanguageTranslator.v3.Examples\IBM.Watson.LanguageTranslator.v3.Examples.csproj", "{03B2FA0D-14C8-485C-8EE8-16715871E813}"
107107
EndProject
108-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBM.Watson.NaturalLangaugeClassifier.v1.Examples", "examples\IBM.Watson.NaturalLangaugeClassifier.v1.Examples\IBM.Watson.NaturalLangaugeClassifier.v1.Examples.csproj", "{B74E72B5-E2C9-43EE-88D2-34315AF3AD33}"
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.NaturalLangaugeClassifier.v1.Examples", "examples\IBM.Watson.NaturalLangaugeClassifier.v1.Examples\IBM.Watson.NaturalLangaugeClassifier.v1.Examples.csproj", "{B74E72B5-E2C9-43EE-88D2-34315AF3AD33}"
109+
EndProject
110+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBM.Watson.SpeechToText.v1.Examples", "examples\IBM.Watson.SpeechToText.v1.Examples\IBM.Watson.SpeechToText.v1.Examples.csproj", "{7D175FD3-128F-48EE-9DBC-9B0D28109CB3}"
109111
EndProject
110112
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBM.Watson.NaturalLanguageUnderstanding.v1.Examples", "examples\IBM.Watson.NaturalLanguageUnderstanding.v1.Examples\IBM.Watson.NaturalLanguageUnderstanding.v1.Examples.csproj", "{0D0A16C3-CCBD-4072-BA81-40E015F0A062}"
111113
EndProject
@@ -281,6 +283,10 @@ Global
281283
{E28E9097-E145-4E36-A762-A55E25686945}.Debug|Any CPU.Build.0 = Debug|Any CPU
282284
{E28E9097-E145-4E36-A762-A55E25686945}.Release|Any CPU.ActiveCfg = Release|Any CPU
283285
{E28E9097-E145-4E36-A762-A55E25686945}.Release|Any CPU.Build.0 = Release|Any CPU
286+
{7D175FD3-128F-48EE-9DBC-9B0D28109CB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
287+
{7D175FD3-128F-48EE-9DBC-9B0D28109CB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
288+
{7D175FD3-128F-48EE-9DBC-9B0D28109CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
289+
{7D175FD3-128F-48EE-9DBC-9B0D28109CB3}.Release|Any CPU.Build.0 = Release|Any CPU
284290
EndGlobalSection
285291
GlobalSection(SolutionProperties) = preSolution
286292
HideSolutionNode = FALSE
@@ -326,6 +332,7 @@ Global
326332
{B74E72B5-E2C9-43EE-88D2-34315AF3AD33} = {5917402E-D9A2-4308-8A1A-9C0692939420}
327333
{0D0A16C3-CCBD-4072-BA81-40E015F0A062} = {89D715BF-7464-45FB-8DA0-9D7B46AB8C7F}
328334
{E28E9097-E145-4E36-A762-A55E25686945} = {D65AC99F-4E63-4362-8765-EB6F15838CA0}
335+
{7D175FD3-128F-48EE-9DBC-9B0D28109CB3} = {254924C9-64CD-4902-97C4-5F9E48DCDF7F}
329336
EndGlobalSection
330337
GlobalSection(ExtensibilityGlobals) = postSolution
331338
SolutionGuid = {B9D9D17B-1C17-402F-B701-DC671528690A}

examples/IBM.Watson.CompareComply.v1.Examples/ServiceExample.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public void CompareDocuments()
168168
{
169169
fs0.CopyTo(ms0);
170170
fs1.CopyTo(ms1);
171-
service.WithHeader("X-Watson-Test", "1");
172171
var result = service.CompareDocuments(
173172
file1: ms0,
174173
file2: ms1,

examples/IBM.Watson.Discovery.v1.Examples/ServiceExample.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ public void CreateStopwordList()
663663
using (MemoryStream ms = new MemoryStream())
664664
{
665665
fs.CopyTo(ms);
666-
service.WithHeader("X-Watson-Test", "1");
667666
result = service.CreateStopwordList(
668667
environmentId: environmentId,
669668
collectionId: collectionId,
@@ -712,7 +711,6 @@ public void AddDocument()
712711
using (MemoryStream ms = new MemoryStream())
713712
{
714713
fs.CopyTo(ms);
715-
service.WithHeader("X-Watson-Test", "1");
716714
result = service.AddDocument(
717715
environmentId: environmentId,
718716
collectionId: collectionId,
@@ -764,16 +762,15 @@ public void UpdateDocument()
764762
using (MemoryStream ms = new MemoryStream())
765763
{
766764
fs.CopyTo(ms);
767-
service.WithHeader("X-Watson-Test", "1");
768765
result = service.UpdateDocument(
769-
environmentId: environmentId,
770-
collectionId: collectionId,
771-
documentId: documentId,
772-
file: ms,
773-
filename: "watson_beats_jeopardy.html",
774-
fileContentType: "text/html",
775-
metadata: metadata
776-
);
766+
environmentId: environmentId,
767+
collectionId: collectionId,
768+
documentId: documentId,
769+
file: ms,
770+
filename: "watson_beats_jeopardy.html",
771+
fileContentType: "text/html",
772+
metadata: metadata
773+
);
777774
}
778775
}
779776

examples/IBM.Watson.LanguageTranslator.v3.Examples/ServiceExample.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ public void CreateModel()
135135
using (MemoryStream ms = new MemoryStream())
136136
{
137137
fs.CopyTo(ms);
138-
service.WithHeader("X-Watson-Test", "1");
139138
result = service.CreateModel(
140139
baseModelId: "en-fr",
141140
forcedGlossary: ms,
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="IBM.Cloud.SDK.Core" Version="0.7.1" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\..\src\IBM.Watson.SpeechToText.v1\IBM.Watson.SpeechToText.v1.csproj" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<None Update="SpeechToTextTestData\test-audio.wav;SpeechToTextTestData\theJabberwocky-utf8.txt;SpeechToTextTestData\confirm.abnf">
18+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19+
</None>
20+
</ItemGroup>
21+
22+
</Project>

0 commit comments

Comments
 (0)