mirror of
https://github.com/dessant/buster.git
synced 2024-11-13 19:10:34 +00:00
parent
182a0aa5cf
commit
e985b7d666
@ -15,6 +15,7 @@ import {
|
||||
functionInContext,
|
||||
getBrowser,
|
||||
getPlatform,
|
||||
getRandomInt,
|
||||
arrayBufferToBase64
|
||||
} from 'utils/common';
|
||||
import {
|
||||
@ -220,7 +221,11 @@ async function prepareAudio(audio) {
|
||||
|
||||
async function getWitSpeechApiKey(speechService, language) {
|
||||
if (speechService === 'witSpeechApiDemo') {
|
||||
return witApiKeys[language];
|
||||
if (language === 'english') {
|
||||
return witApiKeys[language][getRandomInt(1, 4) - 1];
|
||||
} else {
|
||||
return witApiKeys[language];
|
||||
}
|
||||
} else {
|
||||
const {witSpeechApiKeys: apiKeys} = await storage.get(
|
||||
'witSpeechApiKeys',
|
||||
|
@ -8,7 +8,12 @@ const witApiKeys = {
|
||||
catalan: 'YBAZZV6ITGFD3C2QX7CANYQPMGUOI7RK',
|
||||
chinese: 'KBBALJMRKYDJJDMC4NJ32VWCBKFJFIIU',
|
||||
dutch: 'T43TEUNW4HDQFNUTIA3EYTTD4A22AS4H',
|
||||
english: 'NVYD6ZUJMC26US5XS2ZJJ32EDZZ654TD',
|
||||
english: [
|
||||
'BQE4QJJNYC6JVTDULHYIZHQOQFWUVDCQ',
|
||||
'EQAXGAJVZIMI3YMILN2XQZY7IWGUPKGL',
|
||||
'AA3LFNYPDNXX4MUDQQJNLT74YFRQ3M6F',
|
||||
'DRTXENV66YE44PRYOJGWPX2BPGZNPYTQ'
|
||||
],
|
||||
finnish: '3GOWLMYD7DUY72XTPJW6QTVZSK2QEAPT',
|
||||
french: 'JLNITTO2D4KMEOGQ6MTSN634ADK62VZ7',
|
||||
german: 'LPVVXWRBFTVBOOHZAEJC3QRM6E3UMD7I',
|
||||
|
Loading…
Reference in New Issue
Block a user