Skip to content

Commit

Permalink
Refined wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ling Cao authored and boltomli committed May 19, 2020
1 parent 213a970 commit d28dfe3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public static void PrintBatchSynthesisActionUsage(Action action, Dictionary<stri
case Action.create:
actionString = "batchsynthesis create";
description = "Creates a new synthesis.";
sampleCommand = $"CustomVoice-API batchsynthesis create subscriptionKey [YourSubscriptionKey] hostURI {hostUri} name test description test inputTextPath ./script.txt locale en-US models [ModelId]:[ModelId] outputFormat riff-16khz-16bit-mono-pcm isConcatenateResult false";
sampleCommand = $"CustomVoice-API batchsynthesis create subscriptionKey [YourSubscriptionKey] hostURI {hostUri} name test description test inputTextPath ./script.txt locale en-US models modelId1;modelId2 outputFormat riff-16khz-16bit-mono-pcm isConcatenateResult false";
PrintActionUsageBase(actionString, description, sampleCommand, parameters);
break;
case Action.delete:
Expand Down
2 changes: 2 additions & 0 deletions CustomVoice-API-Samples/CSharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ For more detailed usage, please enter: CustomVoice-API [APIKind]

- [OutputFormatForLongAudioAPI](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/long-audio-api#audio-output-formats)

- [SSMLInputFileSampleForLongAudioAPI](https://github.com/Azure-Samples/Cognitive-Speech-TTS/blob/master/CustomVoice-API-Samples/Java/SSMLTextInputSample.txt)

# Contributing

We welcome contributions and are always looking for new SDKs, input, and
Expand Down
10 changes: 6 additions & 4 deletions CustomVoice-API-Samples/Java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ The following are the parameters required for the 5 executable commands:
-te,--timeend <arg> The timeend filter of the voice synthesis query, like 2020-05-15
-tp,--top <arg> The top filter of the voice synthesis query, should be a interger value
```
* Get Voice Synthesis by Id
* Get Voice Synthesis by id
```
[Required]
-gvsi,--getvoicesynthesisbyid
-r,--region <arg> i.e. centralindia
-s,--subscriptionkey <arg> The Speech service subscription key
-vsi,--voicesynthesisid <arg> The id of the synthesis task
```
* Delete Voice Synthesis by Id
* Delete Voice Synthesis by id
```
[Required]
-dvs,--delete
Expand All @@ -67,17 +67,19 @@ The following are the parameters required for the 5 executable commands:

1. The input text file should be Unicode format with 'UTF-8-BOM' (you can check the text format with Notepad++), like the one en-US.txt, and shoule not contains lines more than 10000. Should contain at least 400 billable characters (1 en-US character stands for 1 billable characters and 1 zh-CN character stands for 2 billable characters). If billable characters number < 10000, please expect that the request probably be queued and will be done within 12 hours.If billable characters number > 10000, the request will be executed once where are available resource(not be queued).
See [Billable character](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/text-to-speech#pricing-note).
1. The id of the model (voice) could be acquired from the command "Get supported Voices".
1. The modelidlist could be acquired from the command "Get supported Voices", the input file should be an SSML file if mutilple model ids are set.
1. Client for each subscription account is allowed to submit at most 5 requests to server per second, if hit the bar, client will get a 429 error code(too many requests).
1. Server keep at most 120 requests in queue or running for each subscription accout, if hit the bar, should wait until some requests get completed before submit new ones.
1. Server keep at most 20000 requests for each subscription account. If hit the bar, should delete some requests previously submitted before submit new ones.

## Some parameter sets

- [SupportedRegions](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/regions#speech-to-text-text-to-speech-and-translation) for the region in the host URL.
- [SupportedRegions](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/regions#speech-to-text-text-to-speech-and-translation).

- [OutputFormats](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/long-audio-api#audio-output-formats)

- [SSMLInputFileSample](https://github.com/Azure-Samples/Cognitive-Speech-TTS/blob/master/CustomVoice-API-Samples/Java/SSMLTextInputSample.txt)

# Contributing

We welcome contributions and are always looking for new SDKs, input, and
Expand Down
6 changes: 4 additions & 2 deletions CustomVoice-API-Samples/Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ python voiceclient.py --voices -region centralindia -key your_key_here
```
* Submit a voice synthesis request:
```
python voiceclient.py --submit -region centralindia -key your_key_here -file en-US.txt -locale en-US -voiceId voice_id_here -format riff-16khz-16bit-mono-pcm --concatenateResult
python voiceclient.py --submit -region centralindia -key your_key_here -file en-US.txt -locale en-US -voiceId voiceId1 voiceId2 -format riff-16khz-16bit-mono-pcm --concatenateResult
```
* Delete submitted voice synthesis requests:
```
Expand All @@ -40,7 +40,7 @@ python voiceclient.py --delete -region centralindia -key your_key_here -synthesi

1. The input text file should be Unicode format with 'UTF-8-BOM' (you can check the text format with Notepad++), like the one en-US.txt, and shoule not contains lines more than 10000. Should contain at least 400 billable characters (1 en-US character stands for 1 billable characters and 1 zh-CN character stands for 2 billable characters). If billable characters number < 10000, please expect that the request probably be queued and will be done within 12 hours.If billable characters number > 10000, the request will be executed once where are available resource(not be queued).
See [Billable character](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/text-to-speech#pricing-note).
1. The voiceId should pick up from MS guys or get from step2 above.
1. The voiceId should pick up from MS guys or get from the command "Get available voice list", the input file should be an SSML file if mutilple voice ids are set.
1. 'concatenateResult' is an optional parameter. If this parameter isn't set, the audio outputs will be generated per paragraph.
1. Client for each subscription account is allowed to submit at most 5 requests to server per second, if hit the bar, client will get a 429 error code(too many requests).
1. Server keep at most 120 requests in queue or running for each subscription accout, if hit the bar, should wait until some requests get completed before submit new ones.
Expand All @@ -52,6 +52,8 @@ See [Billable character](https://docs.microsoft.com/en-us/azure/cognitive-servic

- [OutputFormats](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/long-audio-api#audio-output-formats)

- [SSMLInputFileSample](https://github.com/Azure-Samples/Cognitive-Speech-TTS/blob/master/CustomVoice-API-Samples/Java/SSMLTextInputSample.txt)

# Contributing

We welcome contributions and are always looking for new SDKs, input, and
Expand Down
4 changes: 2 additions & 2 deletions CustomVoice-API-Samples/Python/voiceclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
parser.add_argument('-skip', action="store", metavar='N', type=int, dest="skip", help='the skip number in query')
parser.add_argument('-top', action="store", metavar='N', type=int, dest="top", help='the top number in query')
parser.add_argument('-voiceId', action="store", nargs='+', dest="voiceId", help='the id of the voice which used to synthesis')
parser.add_argument('-synthesisId', action="store", nargs='+', dest="synthesisId", help='the id of the voice synthesis which need to be queried or deleted')
parser.add_argument('-synthesisId', action="store", nargs='+', dest="synthesisId", help='the id of the voice synthesis which need to be queried, or the id list of the voice synthesis which need to deleted')
parser.add_argument('-locale', action="store", dest="locale", help='the locale information like zh-CN/en-US')
parser.add_argument('-format', action="store", dest="format", default='riff-16khz-16bit-mono-pcm', help='the output audio format')
parser.add_argument('-key', action="store", dest="key", required=True, help='the Speech service subscription key, like bb82464444c548dea4dce4376f3c7d26 ')
Expand Down Expand Up @@ -134,7 +134,7 @@ def submitSynthesis():
if synthesis is not None:
print ("ID : %s , Name : %s, Status : %s " % (synthesis['id'], synthesis['name'], synthesis['status']))
else:
print ("Not found voice synthesis %s " % (args.synthesisId))
print ("Not found voice synthesis %s " % (args.synthesisId[0]))

if args.delete:
deleteSynthesis(args.synthesisId)
Expand Down

0 comments on commit d28dfe3

Please sign in to comment.