I'm a dumbass, actually fixed conflict
parent
70686c2ce0
commit
3b1a419db4
|
@ -5,7 +5,6 @@ const querystring = require('querystring');
|
||||||
module.exports = class extends BaseEngine {
|
module.exports = class extends BaseEngine {
|
||||||
constructor() {
|
constructor() {
|
||||||
super("IBM Watson TTS", "ogg");
|
super("IBM Watson TTS", "ogg");
|
||||||
<<<<<<< HEAD
|
|
||||||
this.voices = {};
|
this.voices = {};
|
||||||
this.populateVoiceList();
|
this.populateVoiceList();
|
||||||
}
|
}
|
||||||
|
@ -17,13 +16,7 @@ module.exports = class extends BaseEngine {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': authorization
|
'Authorization': authorization
|
||||||
},
|
},
|
||||||
=======
|
}
|
||||||
this.voices = {
|
|
||||||
'Michael': 'en-US_MichaelV3Voice',
|
|
||||||
'Allison': 'en-US_AllisonV3Voice',
|
|
||||||
'Kevin': 'en-US_KevinV3Voice',
|
|
||||||
>>>>>>> 12a9f8fc5374d912e595cea204998daa4d7220ba
|
|
||||||
};
|
|
||||||
const res = await fetch(url, opts);
|
const res = await fetch(url, opts);
|
||||||
const voices = await res.json();
|
const voices = await res.json();
|
||||||
voices.voices.forEach((i) => {
|
voices.voices.forEach((i) => {
|
||||||
|
@ -34,7 +27,6 @@ module.exports = class extends BaseEngine {
|
||||||
getDefaultVoice() {
|
getDefaultVoice() {
|
||||||
return 'Michael';
|
return 'Michael';
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
IBMAuthString() {
|
IBMAuthString() {
|
||||||
let buff = new Buffer('apikey:' + process.env.watsonAPIKey);
|
let buff = new Buffer('apikey:' + process.env.watsonAPIKey);
|
||||||
let b64auth = buff.toString('base64');
|
let b64auth = buff.toString('base64');
|
||||||
|
@ -43,13 +35,6 @@ module.exports = class extends BaseEngine {
|
||||||
async getSpeech(text, voice = this.getSpeechVoice(), params = {}) {
|
async getSpeech(text, voice = this.getSpeechVoice(), params = {}) {
|
||||||
const url = process.env.watsonURL + "/v1/synthesize?voice=" + this.getInternalVoiceName(voice);
|
const url = process.env.watsonURL + "/v1/synthesize?voice=" + this.getInternalVoiceName(voice);
|
||||||
const authorization = this.IBMAuthString();
|
const authorization = this.IBMAuthString();
|
||||||
=======
|
|
||||||
async getSpeech(text, voice = this.getSpeechVoice(), params = {}) {
|
|
||||||
const url = process.env.watsonURL + "/v1/synthesize?voice=" + this.getInternalVoiceName(voice);
|
|
||||||
let buff = new Buffer('apikey:' + process.env.watsonAPIKey);
|
|
||||||
let b64auth = buff.toString('base64');
|
|
||||||
const authorization = 'Basic ' + b64auth;
|
|
||||||
>>>>>>> 12a9f8fc5374d912e595cea204998daa4d7220ba
|
|
||||||
const opts = {
|
const opts = {
|
||||||
method: "post",
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue