Skip to content

Commit

Permalink
🎨 fix import style and update Accept enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Ammar Dodin committed Nov 28, 2017
1 parent 0396c71 commit a31415c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions text-to-speech/v1-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as extend from 'extend';
import extend = require('extend');
import { RequestResponse } from 'request';
import { createRequest } from '../lib/requestwrapper';
import { getMissingParams } from '../lib/helper';
Expand Down Expand Up @@ -168,7 +168,7 @@ class GeneratedTextToSpeechV1 extends BaseService {
method: 'GET',
path: path
},
defaultOptions: extend(true, extend(true, {}, this._options), {
defaultOptions: extend(true, {}, this._options, {
headers: {
accept: 'application/json'
}
Expand Down Expand Up @@ -527,8 +527,7 @@ class GeneratedTextToSpeechV1 extends BaseService {
options: {
url: '/v1/pronunciation',
method: 'GET',
qs: query,
json: true
qs: query
},
defaultOptions: extend(true, {}, this._options, {
headers: {
Expand Down Expand Up @@ -559,7 +558,7 @@ class GeneratedTextToSpeechV1 extends BaseService {
*/
synthesize(
params: GeneratedTextToSpeechV1.SynthesizeParams,
callback?: GeneratedTextToSpeechV1.Callback<ReadableStream>
callback?: GeneratedTextToSpeechV1.Callback<Buffer>
): ReadableStream | void {
const _params = extend({}, params);
const _callback = callback ? callback : () => {};
Expand Down Expand Up @@ -928,19 +927,18 @@ namespace GeneratedTextToSpeechV1 {
export enum Accept {
BASIC = 'audio/basic',
FLAC = 'audio/flac',
L16_RATE_NNNN = 'audio/l16;rate=nnnn',
L16 = 'audio/l16',
OGG = 'audio/ogg',
OGG_CODECS_OPUS = 'audio/ogg;codecs=opus',
OGG_CODECS_VORBIS = 'audio/ogg;codecs=vorbis',
MP3 = 'audio/mp3',
MPEG = 'audio/mpeg',
MULAW_RATE_NNNN = 'audio/mulaw;rate=nnnn',
MULAW = 'audio/mulaw',
WAV = 'audio/wav',
WEBM = 'audio/webm',
WEBM_CODECS_OPUS = 'audio/webm:codecs=opus',
WEBM_CODECS_VORBIS = 'audio/webm:codecs=vorbis'
}

/** Selects a voice to use for synthesis. Retrieve available voices with the `GET /v1/voices` method. **/
export enum Voice {
EN_US_ALLISONVOICE = 'en-US_AllisonVoice',
Expand Down

0 comments on commit a31415c

Please sign in to comment.