Support whisper language/task in various language bindings. (#679)

This commit is contained in:
Fangjun Kuang
2024-03-20 16:43:35 +08:00
committed by GitHub
parent 842d04d7ae
commit acf0975153
15 changed files with 117 additions and 62 deletions

View File

@@ -223,7 +223,8 @@ class OfflineTtsVitsModel::Impl {
inputs.push_back(std::move(length_scale_tensor));
inputs.push_back(std::move(noise_scale_w_tensor));
if (input_names_.size() == 6 && input_names_.back() == "sid") {
if (input_names_.size() == 6 &&
(input_names_.back() == "sid" || input_names_.back() == "speaker")) {
inputs.push_back(std::move(sid_tensor));
}

View File

@@ -2,14 +2,16 @@
//
// Copyright (c) 2023-2024 Xiaomi Corporation
#include "sherpa-onnx/csrc/transducer-keyword-decoder.h"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <utility>
#include <vector>
#include "sherpa-onnx/csrc/log.h"
#include "sherpa-onnx/csrc/onnx-utils.h"
#include "sherpa-onnx/csrc/transducer-keyword-decoder.h"
namespace sherpa_onnx {