language to en if not multilingual
This commit is contained in:
@@ -82,6 +82,9 @@ async function startRecord(option) {
|
|||||||
const socket = new WebSocket(`ws://${option.host}:${option.port}/`);
|
const socket = new WebSocket(`ws://${option.host}:${option.port}/`);
|
||||||
let isServerReady = false;
|
let isServerReady = false;
|
||||||
let language = option.language;
|
let language = option.language;
|
||||||
|
if (language === null && !option.multilingual) {
|
||||||
|
language = 'en';
|
||||||
|
}
|
||||||
socket.onopen = function(e) {
|
socket.onopen = function(e) {
|
||||||
socket.send(
|
socket.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ function resampleTo16kHZ(audioData, origSampleRate = 44100) {
|
|||||||
function startRecording(data) {
|
function startRecording(data) {
|
||||||
socket = new WebSocket(`ws://${data.host}:${data.port}/`);
|
socket = new WebSocket(`ws://${data.host}:${data.port}/`);
|
||||||
language = data.language;
|
language = data.language;
|
||||||
|
if (language === null && !data.useMultilingual) {
|
||||||
|
language = 'en';
|
||||||
|
}
|
||||||
socket.onopen = function(e) {
|
socket.onopen = function(e) {
|
||||||
socket.send(
|
socket.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|||||||
Reference in New Issue
Block a user