Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2025-08-25 11:06:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-08-25 11:06:28 +0800
Commit
3d5d1b9b3c3081f18664f2d3b96d04afea02a83c
3d5d1b9b
1 parent
e8dd5cd2
Fix kokoro tts for punctuations (#2522)
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
6 行增加
和
0 行删除
sherpa-onnx/csrc/kokoro-multi-lang-lexicon.cc
swift-api-examples/compute-speaker-embeddings.swift
sherpa-onnx/csrc/kokoro-multi-lang-lexicon.cc
查看文件 @
3d5d1b9
...
...
@@ -274,6 +274,10 @@ class KokoroMultiLangLexicon::Impl {
std
::
vector
<
std
::
vector
<
int32_t
>>
ConvertNonChineseToTokenIDs
(
const
std
::
string
&
text
,
const
std
::
string
&
voice
)
const
{
if
(
IsPunctuation
(
text
))
{
return
{
std
::
vector
<
int32_t
>
{
0
,
token2id_
.
at
(
text
),
0
}};
}
if
(
!
voice
.
empty
())
{
return
ConvertTextToTokenIDsWithEspeak
(
text
,
voice
);
}
...
...
swift-api-examples/compute-speaker-embeddings.swift
查看文件 @
3d5d1b9
...
...
@@ -5,6 +5,8 @@ Please download test files used in this script from
https://github.com/k2-fsa/sherpa-onnx/releases/tag/speaker-recongition-models
*/
import
Foundation
func
cosineSimilarity
(
_
a
:
[
Float
],
_
b
:
[
Float
])
->
Float
{
precondition
(
a
.
count
==
b
.
count
,
"Vectors must have the same length"
)
...
...
请
注册
或
登录
后发表评论