diff --git a/README.md b/README.md index 6e29fd4..192b699 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ This is the clinet librray of HOYA Voice Text Web API for .NET. Istllation ---------- -You can install via nuget.org **with pre-release switch.** +You can install via nuget.org - PM> Install-Package VoiceTextWebAPI.Client -pre + PM> Install-Package VoiceTextWebAPI.Client Usage ----- -```CSharp +```csharp using VoiceTextWebAPI.Client; ... public async void btn_OnClick() @@ -26,7 +26,8 @@ public async void btn_OnClick() EmotionLevel = EmotionLevel.High, Volume = 50, Speed = 120, - Pitch = 120 + Pitch = 120, + Format = Format.WAV }; var bytes = await client.GetVoiceAsync("こんにちは。"); File.WriteAllBytes(".\\result.wav", bytes); @@ -35,4 +36,4 @@ public async void btn_OnClick() License ------- -Copyright (c) 2014 @jsakamoto. Licensed under the MIT license. \ No newline at end of file +Copyright (c) 2014 @jsakamoto. Licensed under the MIT license. diff --git a/VoiceTextWebAPI.Client/Format.cs b/VoiceTextWebAPI.Client/Format.cs new file mode 100644 index 0000000..1602f38 --- /dev/null +++ b/VoiceTextWebAPI.Client/Format.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace VoiceTextWebAPI.Client +{ + public enum Format + { + WAV, + OGG, + AAC + } +} diff --git a/VoiceTextWebAPI.Client/Properties/AssemblyInfo.cs b/VoiceTextWebAPI.Client/Properties/AssemblyInfo.cs index c06e53c..a6e4603 100644 --- a/VoiceTextWebAPI.Client/Properties/AssemblyInfo.cs +++ b/VoiceTextWebAPI.Client/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct(".NET Client for VoiceText Web API")] -[assembly: AssemblyCopyright("Copyright © J.Sakamoto 2014, MIT License")] +[assembly: AssemblyCopyright("Copyright © J.Sakamoto 2014-2015, MIT License")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,4 +32,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyVersion("1.3.0.1")] diff --git a/VoiceTextWebAPI.Client/VoiceTextClient.cs b/VoiceTextWebAPI.Client/VoiceTextClient.cs index 21eb873..2336b1a 100644 --- a/VoiceTextWebAPI.Client/VoiceTextClient.cs +++ b/VoiceTextWebAPI.Client/VoiceTextClient.cs @@ -23,6 +23,8 @@ public class VoiceTextClient public int Volume { get; set; } + public Format Format { get; set; } + public string APIKey { get; set; } public Uri APIEndPoint { get; set; } @@ -36,6 +38,7 @@ public VoiceTextClient() this.Pitch = 100; this.Speed = 100; this.Volume = 100; + this.Format = Format.WAV; } public byte[] GetVoice(string text) @@ -80,6 +83,7 @@ private FormUrlEncodedContent BuildHttpRequestContent(string text) {"pitch", this.Pitch.ToString()}, {"speed", this.Speed.ToString()}, {"volume", this.Volume.ToString()}, + {"format", this.Format.ToString().ToLower()}, }; if (this.Emotion != Emotion.Default) { diff --git a/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.csproj b/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.csproj index cd48861..8915598 100644 --- a/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.csproj +++ b/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.csproj @@ -46,6 +46,7 @@ + diff --git a/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.nuspec b/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.nuspec index af88646..188eacf 100644 --- a/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.nuspec +++ b/VoiceTextWebAPI.Client/VoiceTextWebAPI.Client.nuspec @@ -2,7 +2,7 @@ $id$ - $version$-beta + $version$ $title$ J.Sakamoto J.Sakamoto @@ -18,6 +18,8 @@