Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
a83374a7
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
12 个月 前同步成功
通知
204
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a83374a7
编写于
5月 25, 2022
作者:
X
xiongxinlei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update the vector readme, test=doc
上级
7afbdbef
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
115 addition
and
172 deletion
+115
-172
demos/speaker_verification/README.md
demos/speaker_verification/README.md
+39
-39
demos/speaker_verification/README_cn.md
demos/speaker_verification/README_cn.md
+39
-39
demos/speech_server/README.md
demos/speech_server/README.md
+18
-17
demos/speech_server/README_cn.md
demos/speech_server/README_cn.md
+19
-18
paddlespeech/server/tests/vector/http_client.py
paddlespeech/server/tests/vector/http_client.py
+0
-59
未找到文件。
demos/speaker_verification/README.md
浏览文件 @
a83374a7
...
...
@@ -127,45 +127,45 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav
```
bash
# Vector Result:
Audio embedding Result:
[
1.4217498 5.626253
-5
.342073 1.1773866 3.30805
5
1.756596 5.167894 10.80636
-3
.8226728
-5
.6141334
2.623845
-0
.8072968 1.9635103
-7
.3128724 0.01103897
-
9
.723131 0.6619743
-6
.976803 10.213478 7.494748
2.9105635 3.8949256 3.7999806 7.1061673 16.905321
-7
.1493764 8.733103 3.4230042
-4
.831653
-11
.403367
11.232214 7.1274667
-4
.2828417 2.452362
-5
.130748
-1
8
.177666
-2
.6116815
-11
.000337
-6
.7314315 1.6564683
0.7618269 1.1253023
-2
.083836 4.725744
-8
.78259
7
-3
.539873 3.814236 5.1420674 2.162061 4.096431
-6
.4162116 12.747448 1.9429878
-15
.152943 6.417416
16.097002
-9
.716668
-1
.9920526
-3
.3649497
-1
.871939
11.567354 3.69788 11.258265 7.442363 9.183411
4.5281515
-1
.2417862 4.3959084 6.6727695 5.8898783
7.627124
-0
.66919386
-11
.889693
-9
.208865
-7
.427407
3
-3
.7776625 6.917234
-9
.848748
-2
.0944717
-5
.135116
0.49563864 9.317534
-5
.9141874
-1
.8098574
-0
.11738578
-7
.169265
-1
.0578263
-5
.7216787
-5
.1173844 16.137651
-4
.473626 7.6624317
-0
.55381083 9.631587
-6
.4704556
-
8
.548508 4.3716145
-0
.79702514 4.478997
-2
.9758704
3.272176 2.8382776 5.134597
-9
.190781
-0
.5657382
-4
.8745747 2.3165567
-5
.984303
-2
.1798875 0.35541576
-0
.31784213 9.493548 2.1144536 4.358092
-12
.089823
8.451689
-7
.925461 4.6242585 4.4289427 18.692003
-2
.6204622
-5
.149185
-0
.35821092 8.488551 4.981496
-9
.32683
-2
.2544234 6.6417594 1.2119585 10.977129
16.555033 3.3238444 9.551863
-1
.6676947
-0
.79539716
-8
.605674
-0
.47356385 2.6741948
-5
.359179
-2
.6673796
0.66607 15.443222 4.740594
-3
.4725387 11.59256
7
-2
.054497 1.7361217
-8
.265324
-9
.30447 5.4068313
-1
.5180256
-7
.746615
-6
.089606 0.07112726
-0
.34904733
-8
.649895
-9
.998958
-2
.564841
-0
.53999114 2.601808
-0
.31927416
-1
.8815292
-2
.07215
-3
.4105783
-8
.2998085
1.483641
-15
.365992
-8
.288208 3.8847756
-3
.4876456
7.3629923 0.4657332 3.132599 12.438889
-1
.8337058
4.532936 2.7264361 10.145339
-6
.521951 2.897153
-3
.3925855 5.079156 7.759716 4.677565 5.8457737
2.402413 7.7071047 3.9711342
-6
.390043 6.1268735
-3
.7760346
-11
.118123
]
[
-1
.3251206 7.8606825
-4
.620626 0.3000721 2.264853
5
-1
.1931441 3.0647137 7.673595
-6
.0044727
-12
.02426
-1
.9496069 3.1269536 1.618838
-7
.6383104
-1
.2299773
-
12
.338331 2.1373026
-5
.3957124 9.717328 5.6752305
3.7805123 3.0597172 3.429692 8.97601 13.174125
-0
.53132284 8.9424715 4.46511
-4
.4262476
-9
.726503
8.399328 7.2239175
-7
.435854 2.9441683
-4
.3430395
-1
3
.886965
-1
.6346735
-10
.9027405
-5
.311245 3.8007221
3.8976038
-2
.1230774
-2
.3521194 4.151031
-7
.404866
7
0.13911647 2.4626107 4.9664545 0.9897574 5.4839754
-3
.3574002 10.1340065
-0
.6120171
-10
.403095 4.6007543
16.00935
-7
.7836914
-4
.1945305
-6
.9368606 1.1789556
11.490801 4.2380238 9.550931 8.375046 7.5089145
-0
.65707296
-0
.30051577 2.8406055 3.0828028 0.730817
6.148354 0.13766119
-13
.424735
-7
.7461405
-2
.322798
3
-8
.305252 2.9879124
-10
.995229 0.15211068
-2
.3820348
-1
.7984174 8.495629
-5
.8522367
-3
.755498 0.6989711
-5
.2702994
-2
.6188622
-1
.8828466
-4
.64665 14.078544
-0
.5495333 10.579158
-3
.2160501 9.349004
-4
.381078
-
11
.675817
-2
.8630207 4.5721755 2.246612
-4
.574342
1.8610188 2.3767874 5.6257877
-9
.784078 0.64967257
-1
.4579505 0.4263264
-4
.9211264
-2
.454784 3.4869802
-0
.42654222 8.341269 1.356552 7.0966883
-13
.102829
8.016734
-7
.1159344 1.8699781 0.208721 14.699384
-1
.025278
-2
.6107233
-2
.5082312 8.427193 6.9138527
-6
.2912464 0.6157366 2.489688
-3
.4668267 9.921763
11.200815
-0
.1966403 7.4916005
-0
.62312716
-0
.25848144
-9
.947997
-0
.9611041 1.1649219
-2
.1907122
-1
.5028487
-0
.51926106 15.165954 2.4649463
-0
.9980445 7.441663
7
-2
.0768049 3.5896823
-7
.3055434
-7
.5620847 4.323335
0.0804418
-6
.56401
-2
.3148053
-1
.7642345
-2
.4708817
-7
.675618
-9
.548878
-1
.0177554 0.16986446 2.5877135
-1
.8752296
-0
.36614323
-6
.0493784
-2
.3965611
-5
.9453387
0.9424033
-13
.155974
-7
.457801 0.14658108
-3
.742797
5.8414927
-1
.2872906 5.5694313 12.57059 1.0939219
2.2142086 1.9181576 6.9914207
-5
.888139 3.1409824
-2
.003628 2.4434285 9.973139 5.03668 2.0051203
2.8615603 5.860224 2.9176188
-1
.6311141 2.0292206
-4
.070415
-6
.831437
]
# get the test embedding
Test embedding Result:
[
2.5247195 5.119042
-4
.335273 4.4583654 5.047907
...
...
demos/speaker_verification/README_cn.md
浏览文件 @
a83374a7
...
...
@@ -125,45 +125,45 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav
```
bash
# Vector Result:
Audio embedding Result:
[
1.4217498 5.626253
-5
.342073 1.1773866 3.30805
5
1.756596 5.167894 10.80636
-3
.8226728
-5
.6141334
2.623845
-0
.8072968 1.9635103
-7
.3128724 0.01103897
-
9
.723131 0.6619743
-6
.976803 10.213478 7.494748
2.9105635 3.8949256 3.7999806 7.1061673 16.905321
-7
.1493764 8.733103 3.4230042
-4
.831653
-11
.403367
11.232214 7.1274667
-4
.2828417 2.452362
-5
.130748
-1
8
.177666
-2
.6116815
-11
.000337
-6
.7314315 1.6564683
0.7618269 1.1253023
-2
.083836 4.725744
-8
.78259
7
-3
.539873 3.814236 5.1420674 2.162061 4.096431
-6
.4162116 12.747448 1.9429878
-15
.152943 6.417416
16.097002
-9
.716668
-1
.9920526
-3
.3649497
-1
.871939
11.567354 3.69788 11.258265 7.442363 9.183411
4.5281515
-1
.2417862 4.3959084 6.6727695 5.8898783
7.627124
-0
.66919386
-11
.889693
-9
.208865
-7
.427407
3
-3
.7776625 6.917234
-9
.848748
-2
.0944717
-5
.135116
0.49563864 9.317534
-5
.9141874
-1
.8098574
-0
.11738578
-7
.169265
-1
.0578263
-5
.7216787
-5
.1173844 16.137651
-4
.473626 7.6624317
-0
.55381083 9.631587
-6
.4704556
-
8
.548508 4.3716145
-0
.79702514 4.478997
-2
.9758704
3.272176 2.8382776 5.134597
-9
.190781
-0
.5657382
-4
.8745747 2.3165567
-5
.984303
-2
.1798875 0.35541576
-0
.31784213 9.493548 2.1144536 4.358092
-12
.089823
8.451689
-7
.925461 4.6242585 4.4289427 18.692003
-2
.6204622
-5
.149185
-0
.35821092 8.488551 4.981496
-9
.32683
-2
.2544234 6.6417594 1.2119585 10.977129
16.555033 3.3238444 9.551863
-1
.6676947
-0
.79539716
-8
.605674
-0
.47356385 2.6741948
-5
.359179
-2
.6673796
0.66607 15.443222 4.740594
-3
.4725387 11.59256
7
-2
.054497 1.7361217
-8
.265324
-9
.30447 5.4068313
-1
.5180256
-7
.746615
-6
.089606 0.07112726
-0
.34904733
-8
.649895
-9
.998958
-2
.564841
-0
.53999114 2.601808
-0
.31927416
-1
.8815292
-2
.07215
-3
.4105783
-8
.2998085
1.483641
-15
.365992
-8
.288208 3.8847756
-3
.4876456
7.3629923 0.4657332 3.132599 12.438889
-1
.8337058
4.532936 2.7264361 10.145339
-6
.521951 2.897153
-3
.3925855 5.079156 7.759716 4.677565 5.8457737
2.402413 7.7071047 3.9711342
-6
.390043 6.1268735
-3
.7760346
-11
.118123
]
[
-1
.3251206 7.8606825
-4
.620626 0.3000721 2.264853
5
-1
.1931441 3.0647137 7.673595
-6
.0044727
-12
.02426
-1
.9496069 3.1269536 1.618838
-7
.6383104
-1
.2299773
-
12
.338331 2.1373026
-5
.3957124 9.717328 5.6752305
3.7805123 3.0597172 3.429692 8.97601 13.174125
-0
.53132284 8.9424715 4.46511
-4
.4262476
-9
.726503
8.399328 7.2239175
-7
.435854 2.9441683
-4
.3430395
-1
3
.886965
-1
.6346735
-10
.9027405
-5
.311245 3.8007221
3.8976038
-2
.1230774
-2
.3521194 4.151031
-7
.404866
7
0.13911647 2.4626107 4.9664545 0.9897574 5.4839754
-3
.3574002 10.1340065
-0
.6120171
-10
.403095 4.6007543
16.00935
-7
.7836914
-4
.1945305
-6
.9368606 1.1789556
11.490801 4.2380238 9.550931 8.375046 7.5089145
-0
.65707296
-0
.30051577 2.8406055 3.0828028 0.730817
6.148354 0.13766119
-13
.424735
-7
.7461405
-2
.322798
3
-8
.305252 2.9879124
-10
.995229 0.15211068
-2
.3820348
-1
.7984174 8.495629
-5
.8522367
-3
.755498 0.6989711
-5
.2702994
-2
.6188622
-1
.8828466
-4
.64665 14.078544
-0
.5495333 10.579158
-3
.2160501 9.349004
-4
.381078
-
11
.675817
-2
.8630207 4.5721755 2.246612
-4
.574342
1.8610188 2.3767874 5.6257877
-9
.784078 0.64967257
-1
.4579505 0.4263264
-4
.9211264
-2
.454784 3.4869802
-0
.42654222 8.341269 1.356552 7.0966883
-13
.102829
8.016734
-7
.1159344 1.8699781 0.208721 14.699384
-1
.025278
-2
.6107233
-2
.5082312 8.427193 6.9138527
-6
.2912464 0.6157366 2.489688
-3
.4668267 9.921763
11.200815
-0
.1966403 7.4916005
-0
.62312716
-0
.25848144
-9
.947997
-0
.9611041 1.1649219
-2
.1907122
-1
.5028487
-0
.51926106 15.165954 2.4649463
-0
.9980445 7.441663
7
-2
.0768049 3.5896823
-7
.3055434
-7
.5620847 4.323335
0.0804418
-6
.56401
-2
.3148053
-1
.7642345
-2
.4708817
-7
.675618
-9
.548878
-1
.0177554 0.16986446 2.5877135
-1
.8752296
-0
.36614323
-6
.0493784
-2
.3965611
-5
.9453387
0.9424033
-13
.155974
-7
.457801 0.14658108
-3
.742797
5.8414927
-1
.2872906 5.5694313 12.57059 1.0939219
2.2142086 1.9181576 6.9914207
-5
.888139 3.1409824
-2
.003628 2.4434285 9.973139 5.03668 2.0051203
2.8615603 5.860224 2.9176188
-1
.6311141 2.0292206
-4
.070415
-6
.831437
]
# get the test embedding
Test embedding Result:
[
2.5247195 5.119042
-4
.335273 4.4583654 5.047907
...
...
demos/speech_server/README.md
浏览文件 @
a83374a7
...
...
@@ -274,12 +274,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
Output:
```
bash
[
2022-05-
08 00:18:44,249
]
[
INFO] - vector http client start
[
2022-05-
08 00:18:44,250
]
[
INFO] - the input audio: 85236145389.wav
[
2022-05-
08 00:18:44,250]
[
INFO] - endpoint: http://127.0.0.1:80
90/paddlespeech/vector
[
2022-05-
08 00:18:44,250]
[
INFO] - http://127.0.0.1:85
90/paddlespeech/vector
[
2022-05-
08 00:18:44,406]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
1.421751856803894, 5.626245498657227,
-5
.342077255249023, 1.1773887872695923, 3.3080549240112305, 1.7565933465957642, 5.167886257171631, 10.806358337402344,
-3
.8226819038391113,
-5
.614140033721924, 2.6238479614257812,
-0
.8072972893714905, 1.9635076522827148,
-7
.312870025634766, 0.011035939678549767,
-9
.723129272460938, 0.6619706153869629,
-6
.976806163787842, 10.213476181030273, 7.494769096374512, 2.9105682373046875, 3.8949244022369385, 3.799983501434326, 7.106168746948242, 16.90532875061035,
-7
.149388313293457, 8.733108520507812, 3.423006296157837,
-4
.831653594970703,
-11
.403363227844238, 11.232224464416504, 7.127461910247803,
-4
.282842636108398, 2.452359437942505,
-5
.130749702453613,
-18
.17766761779785,
-2
.6116831302642822,
-11
.000344276428223,
-6
.731433391571045, 1.6564682722091675, 0.7618281245231628, 1.125300407409668,
-2
.0838370323181152, 4.725743293762207,
-8
.782588005065918,
-3
.5398752689361572, 3.8142364025115967, 5.142068862915039, 2.1620609760284424, 4.09643030166626,
-6
.416214942932129, 12.747446060180664, 1.9429892301559448,
-15
.15294361114502, 6.417416095733643, 16.09701156616211,
-9
.716667175292969,
-1
.9920575618743896,
-3
.36494779586792,
-1
.8719440698623657, 11.567351341247559, 3.6978814601898193, 11.258262634277344, 7.442368507385254, 9.183408737182617, 4.528149127960205,
-1
.2417854070663452, 4.395912170410156, 6.6727728843688965, 5.88988733291626, 7.627128601074219,
-0
.6691966652870178,
-11
.889698028564453,
-9
.20886516571045,
-7
.42740535736084,
-3
.777663230895996, 6.917238712310791,
-9
.848755836486816,
-2
.0944676399230957,
-5
.1351165771484375, 0.4956451654434204, 9.317537307739258,
-5
.914181232452393,
-1
.809860348701477,
-0
.11738915741443634,
-7
.1692705154418945,
-1
.057827353477478,
-5
.721670627593994,
-5
.117385387420654, 16.13765525817871,
-4
.473617076873779, 7.6624321937561035,
-0
.55381840467453, 9.631585121154785,
-6
.470459461212158,
-8
.548508644104004, 4.371616840362549,
-0
.7970245480537415, 4.4789886474609375,
-2
.975860834121704, 3.2721822261810303, 2.838287830352783, 5.134591102600098,
-9
.19079875946045,
-0
.5657302737236023,
-4
.8745832443237305, 2.3165574073791504,
-5
.984319686889648,
-2
.1798853874206543, 0.3554139733314514,
-0
.3178512752056122, 9.493552207946777, 2.1144471168518066, 4.358094692230225,
-12
.089824676513672, 8.451693534851074,
-7
.925466537475586, 4.624246597290039, 4.428936958312988, 18.69200897216797,
-2
.6204581260681152,
-5
.14918851852417,
-0
.3582090139389038, 8.488558769226074, 4.98148775100708,
-9
.326835632324219,
-2
.2544219493865967, 6.641760349273682, 1.2119598388671875, 10.977124214172363, 16.555034637451172, 3.3238420486450195, 9.551861763000488,
-1
.6676981449127197,
-0
.7953944206237793,
-8
.605667114257812,
-0
.4735655188560486, 2.674196243286133,
-5
.359177112579346,
-2
.66738224029541, 0.6660683155059814, 15.44322681427002, 4.740593433380127,
-3
.472534418106079, 11.592567443847656,
-2
.0544962882995605, 1.736127495765686,
-8
.265326499938965,
-9
.30447769165039, 5.406829833984375,
-1
.518022894859314,
-7
.746612548828125,
-6
.089611053466797, 0.07112743705511093,
-0
.3490503430366516,
-8
.64989185333252,
-9
.998957633972168,
-2
.564845085144043,
-0
.5399947762489319, 2.6018123626708984,
-0
.3192799389362335,
-1
.8815255165100098,
-2
.0721492767333984,
-3
.410574436187744,
-8
.29980754852295, 1.483638048171997,
-15
.365986824035645,
-8
.288211822509766, 3.884779930114746,
-3
.4876468181610107, 7.362999439239502, 0.4657334089279175, 3.1326050758361816, 12.438895225524902,
-1
.8337041139602661, 4.532927989959717, 2.7264339923858643, 10.14534854888916,
-6
.521963596343994, 2.897155523300171,
-3
.392582654953003, 5.079153060913086, 7.7597246170043945, 4.677570819854736, 5.845779895782471, 2.402411460876465, 7.7071051597595215, 3.9711380004882812,
-6
.39003849029541, 6.12687873840332,
-3
.776029348373413,
-11
.118121147155762
]
}}
[
2022-05-
08 00:18:44,406]
[
INFO] - Response
time
0.156481
s.
[
2022-05-
25 12:25:36,165
]
[
INFO] - vector http client start
[
2022-05-
25 12:25:36,165
]
[
INFO] - the input audio: 85236145389.wav
[
2022-05-
25 12:25:36,165]
[
INFO] - endpoint: http://127.0.0.1:87
90/paddlespeech/vector
[
2022-05-
25 12:25:36,166]
[
INFO] - http://127.0.0.1:87
90/paddlespeech/vector
[
2022-05-
25 12:25:36,324]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
-1
.3251205682754517, 7.860682487487793,
-4
.620625972747803, 0.3000721037387848, 2.2648534774780273,
-1
.1931440830230713, 3.064713716506958, 7.673594951629639,
-6
.004472732543945,
-12
.024259567260742,
-1
.9496068954467773, 3.126953601837158, 1.6188379526138306,
-7
.638310432434082,
-1
.2299772500991821,
-12
.33833122253418, 2.1373026371002197,
-5
.395712375640869, 9.717328071594238, 5.675230503082275, 3.7805123329162598, 3.0597171783447266, 3.429692029953003, 8.9760103225708, 13.174124717712402,
-0
.5313228368759155, 8.942471504211426, 4.465109825134277,
-4
.426247596740723,
-9
.726503372192383, 8.399328231811523, 7.223917484283447,
-7
.435853958129883, 2.9441683292388916,
-4
.343039512634277,
-13
.886964797973633,
-1
.6346734762191772,
-10
.902740478515625,
-5
.311244964599609, 3.800722122192383, 3.897603750228882,
-2
.123077392578125,
-2
.3521194458007812, 4.151031017303467,
-7
.404866695404053, 0.13911646604537964, 2.4626107215881348, 4.96645450592041, 0.9897574186325073, 5.483975410461426,
-3
.3574001789093018, 10.13400650024414,
-0
.6120170950889587,
-10
.403095245361328, 4.600754261016846, 16.009349822998047,
-7
.78369140625,
-4
.194530487060547,
-6
.93686056137085, 1.1789555549621582, 11.490800857543945, 4.23802375793457, 9.550930976867676, 8.375045776367188, 7.508914470672607,
-0
.6570729613304138,
-0
.3005157709121704, 2.8406054973602295, 3.0828027725219727, 0.7308170199394226, 6.1483540534973145, 0.1376611888408661,
-13
.424735069274902,
-7
.746140480041504,
-2
.322798252105713,
-8
.305252075195312, 2.98791241645813,
-10
.99522876739502, 0.15211068093776703,
-2
.3820347785949707,
-1
.7984174489974976, 8.49562931060791,
-5
.852236747741699,
-3
.755497932434082, 0.6989710927009583,
-5
.270299434661865,
-2
.6188621520996094,
-1
.8828465938568115,
-4
.6466498374938965, 14.078543663024902,
-0
.5495333075523376, 10.579157829284668,
-3
.216050148010254, 9.349003791809082,
-4
.381077766418457,
-11
.675816535949707,
-2
.863020658493042, 4.5721755027771, 2.246612071990967,
-4
.574341773986816, 1.8610187768936157, 2.3767874240875244, 5.625787734985352,
-9
.784077644348145, 0.6496725678443909,
-1
.457950472831726, 0.4263263940811157,
-4
.921126365661621,
-2
.4547839164733887, 3.4869801998138428,
-0
.4265422224998474, 8.341268539428711, 1.356552004814148, 7.096688270568848,
-13
.102828979492188, 8.01673412322998,
-7
.115934371948242, 1.8699780702590942, 0.20872099697589874, 14.699383735656738,
-1
.0252779722213745,
-2
.6107232570648193,
-2
.5082311630249023, 8.427192687988281, 6.913852691650391,
-6
.29124641418457, 0.6157366037368774, 2.489687919616699,
-3
.4668266773223877, 9.92176342010498, 11.200815200805664,
-0
.19664029777050018, 7.491600513458252,
-0
.6231271624565125,
-0
.2584814429283142,
-9
.947997093200684,
-0
.9611040949821472, 1.1649218797683716,
-2
.1907122135162354,
-1
.502848744392395,
-0
.5192610621452332, 15.165953636169434, 2.4649462699890137,
-0
.998044490814209, 7.44166374206543,
-2
.0768048763275146, 3.5896823406219482,
-7
.305543422698975,
-7
.562084674835205, 4.32333517074585, 0.08044180274009705,
-6
.564010143280029,
-2
.314805269241333,
-1
.7642345428466797,
-2
.470881700515747,
-7
.6756181716918945,
-9
.548877716064453,
-1
.017755389213562, 0.1698644608259201, 2.5877134799957275,
-1
.8752295970916748,
-0
.36614322662353516,
-6
.049378395080566,
-2
.3965611457824707,
-5
.945338726043701, 0.9424033164978027,
-13
.155974388122559,
-7
.45780086517334, 0.14658108353614807,
-3
.7427968978881836, 5.841492652893066,
-1
.2872905731201172, 5.569431304931641, 12.570590019226074, 1.0939218997955322, 2.2142086029052734, 1.9181575775146484, 6.991420745849609,
-5
.888138771057129, 3.1409823894500732,
-2
.0036280155181885, 2.4434285163879395, 9.973138809204102, 5.036680221557617, 2.005120277404785, 2.861560344696045, 5.860223770141602, 2.917618751525879,
-1
.63111412525177, 2.0292205810546875,
-4
.070415019989014,
-6
.831437110900879
]
}}
[
2022-05-
25 12:25:36,324]
[
INFO] - Response
time
0.159053
s.
```
*
Python API
...
...
@@ -299,7 +299,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
Output:
```
bash
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
1.421751856803894, 5.626245498657227,
-5
.342077255249023, 1.1773887872695923, 3.3080549240112305, 1.7565933465957642, 5.167886257171631, 10.806358337402344,
-3
.8226819038391113,
-5
.614140033721924, 2.6238479614257812,
-0
.8072972893714905, 1.9635076522827148,
-7
.312870025634766, 0.011035939678549767,
-9
.723129272460938, 0.6619706153869629,
-6
.976806163787842, 10.213476181030273, 7.494769096374512, 2.9105682373046875, 3.8949244022369385, 3.799983501434326, 7.106168746948242, 16.90532875061035,
-7
.149388313293457, 8.733108520507812, 3.423006296157837,
-4
.831653594970703,
-11
.403363227844238, 11.232224464416504, 7.127461910247803,
-4
.282842636108398, 2.452359437942505,
-5
.130749702453613,
-18
.17766761779785,
-2
.6116831302642822,
-11
.000344276428223,
-6
.731433391571045, 1.6564682722091675, 0.7618281245231628, 1.125300407409668,
-2
.0838370323181152, 4.725743293762207,
-8
.782588005065918,
-3
.5398752689361572, 3.8142364025115967, 5.142068862915039, 2.1620609760284424, 4.09643030166626,
-6
.416214942932129, 12.747446060180664, 1.9429892301559448,
-15
.15294361114502, 6.417416095733643, 16.09701156616211,
-9
.716667175292969,
-1
.9920575618743896,
-3
.36494779586792,
-1
.8719440698623657, 11.567351341247559, 3.6978814601898193, 11.258262634277344, 7.442368507385254, 9.183408737182617, 4.528149127960205,
-1
.2417854070663452, 4.395912170410156, 6.6727728843688965, 5.88988733291626, 7.627128601074219,
-0
.6691966652870178,
-11
.889698028564453,
-9
.20886516571045,
-7
.42740535736084,
-3
.777663230895996, 6.917238712310791,
-9
.848755836486816,
-2
.0944676399230957,
-5
.1351165771484375, 0.4956451654434204, 9.317537307739258,
-5
.914181232452393,
-1
.809860348701477,
-0
.11738915741443634,
-7
.1692705154418945,
-1
.057827353477478,
-5
.721670627593994,
-5
.117385387420654, 16.13765525817871,
-4
.473617076873779, 7.6624321937561035,
-0
.55381840467453, 9.631585121154785,
-6
.470459461212158,
-8
.548508644104004, 4.371616840362549,
-0
.7970245480537415, 4.4789886474609375,
-2
.975860834121704, 3.2721822261810303, 2.838287830352783, 5.134591102600098,
-9
.19079875946045,
-0
.5657302737236023,
-4
.8745832443237305, 2.3165574073791504,
-5
.984319686889648,
-2
.1798853874206543, 0.3554139733314514,
-0
.3178512752056122, 9.493552207946777, 2.1144471168518066, 4.358094692230225,
-12
.089824676513672, 8.451693534851074,
-7
.925466537475586, 4.624246597290039, 4.428936958312988, 18.69200897216797,
-2
.6204581260681152,
-5
.14918851852417,
-0
.3582090139389038, 8.488558769226074, 4.98148775100708,
-9
.326835632324219,
-2
.2544219493865967, 6.641760349273682, 1.2119598388671875, 10.977124214172363, 16.555034637451172, 3.3238420486450195, 9.551861763000488,
-1
.6676981449127197,
-0
.7953944206237793,
-8
.605667114257812,
-0
.4735655188560486, 2.674196243286133,
-5
.359177112579346,
-2
.66738224029541, 0.6660683155059814, 15.44322681427002, 4.740593433380127,
-3
.472534418106079, 11.592567443847656,
-2
.0544962882995605, 1.736127495765686,
-8
.265326499938965,
-9
.30447769165039, 5.406829833984375,
-1
.518022894859314,
-7
.746612548828125,
-6
.089611053466797, 0.07112743705511093,
-0
.3490503430366516,
-8
.64989185333252,
-9
.998957633972168,
-2
.564845085144043,
-0
.5399947762489319, 2.6018123626708984,
-0
.3192799389362335,
-1
.8815255165100098,
-2
.0721492767333984,
-3
.410574436187744,
-8
.29980754852295, 1.483638048171997,
-15
.365986824035645,
-8
.288211822509766, 3.884779930114746,
-3
.4876468181610107, 7.362999439239502, 0.4657334089279175, 3.1326050758361816, 12.438895225524902,
-1
.8337041139602661, 4.532927989959717, 2.7264339923858643, 10.14534854888916,
-6
.521963596343994, 2.897155523300171,
-3
.392582654953003, 5.079153060913086, 7.7597246170043945, 4.677570819854736, 5.845779895782471, 2.402411460876465, 7.7071051597595215, 3.9711380004882812,
-6
.39003849029541, 6.12687873840332,
-3
.776029348373413,
-11
.118121147155762
]
}}
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
-1
.3251205682754517, 7.860682487487793,
-4
.620625972747803, 0.3000721037387848, 2.2648534774780273,
-1
.1931440830230713, 3.064713716506958, 7.673594951629639,
-6
.004472732543945,
-12
.024259567260742,
-1
.9496068954467773, 3.126953601837158, 1.6188379526138306,
-7
.638310432434082,
-1
.2299772500991821,
-12
.33833122253418, 2.1373026371002197,
-5
.395712375640869, 9.717328071594238, 5.675230503082275, 3.7805123329162598, 3.0597171783447266, 3.429692029953003, 8.9760103225708, 13.174124717712402,
-0
.5313228368759155, 8.942471504211426, 4.465109825134277,
-4
.426247596740723,
-9
.726503372192383, 8.399328231811523, 7.223917484283447,
-7
.435853958129883, 2.9441683292388916,
-4
.343039512634277,
-13
.886964797973633,
-1
.6346734762191772,
-10
.902740478515625,
-5
.311244964599609, 3.800722122192383, 3.897603750228882,
-2
.123077392578125,
-2
.3521194458007812, 4.151031017303467,
-7
.404866695404053, 0.13911646604537964, 2.4626107215881348, 4.96645450592041, 0.9897574186325073, 5.483975410461426,
-3
.3574001789093018, 10.13400650024414,
-0
.6120170950889587,
-10
.403095245361328, 4.600754261016846, 16.009349822998047,
-7
.78369140625,
-4
.194530487060547,
-6
.93686056137085, 1.1789555549621582, 11.490800857543945, 4.23802375793457, 9.550930976867676, 8.375045776367188, 7.508914470672607,
-0
.6570729613304138,
-0
.3005157709121704, 2.8406054973602295, 3.0828027725219727, 0.7308170199394226, 6.1483540534973145, 0.1376611888408661,
-13
.424735069274902,
-7
.746140480041504,
-2
.322798252105713,
-8
.305252075195312, 2.98791241645813,
-10
.99522876739502, 0.15211068093776703,
-2
.3820347785949707,
-1
.7984174489974976, 8.49562931060791,
-5
.852236747741699,
-3
.755497932434082, 0.6989710927009583,
-5
.270299434661865,
-2
.6188621520996094,
-1
.8828465938568115,
-4
.6466498374938965, 14.078543663024902,
-0
.5495333075523376, 10.579157829284668,
-3
.216050148010254, 9.349003791809082,
-4
.381077766418457,
-11
.675816535949707,
-2
.863020658493042, 4.5721755027771, 2.246612071990967,
-4
.574341773986816, 1.8610187768936157, 2.3767874240875244, 5.625787734985352,
-9
.784077644348145, 0.6496725678443909,
-1
.457950472831726, 0.4263263940811157,
-4
.921126365661621,
-2
.4547839164733887, 3.4869801998138428,
-0
.4265422224998474, 8.341268539428711, 1.356552004814148, 7.096688270568848,
-13
.102828979492188, 8.01673412322998,
-7
.115934371948242, 1.8699780702590942, 0.20872099697589874, 14.699383735656738,
-1
.0252779722213745,
-2
.6107232570648193,
-2
.5082311630249023, 8.427192687988281, 6.913852691650391,
-6
.29124641418457, 0.6157366037368774, 2.489687919616699,
-3
.4668266773223877, 9.92176342010498, 11.200815200805664,
-0
.19664029777050018, 7.491600513458252,
-0
.6231271624565125,
-0
.2584814429283142,
-9
.947997093200684,
-0
.9611040949821472, 1.1649218797683716,
-2
.1907122135162354,
-1
.502848744392395,
-0
.5192610621452332, 15.165953636169434, 2.4649462699890137,
-0
.998044490814209, 7.44166374206543,
-2
.0768048763275146, 3.5896823406219482,
-7
.305543422698975,
-7
.562084674835205, 4.32333517074585, 0.08044180274009705,
-6
.564010143280029,
-2
.314805269241333,
-1
.7642345428466797,
-2
.470881700515747,
-7
.6756181716918945,
-9
.548877716064453,
-1
.017755389213562, 0.1698644608259201, 2.5877134799957275,
-1
.8752295970916748,
-0
.36614322662353516,
-6
.049378395080566,
-2
.3965611457824707,
-5
.945338726043701, 0.9424033164978027,
-13
.155974388122559,
-7
.45780086517334, 0.14658108353614807,
-3
.7427968978881836, 5.841492652893066,
-1
.2872905731201172, 5.569431304931641, 12.570590019226074, 1.0939218997955322, 2.2142086029052734, 1.9181575775146484, 6.991420745849609,
-5
.888138771057129, 3.1409823894500732,
-2
.0036280155181885, 2.4434285163879395, 9.973138809204102, 5.036680221557617, 2.005120277404785, 2.861560344696045, 5.860223770141602, 2.917618751525879,
-1
.63111412525177, 2.0292205810546875,
-4
.070415019989014,
-6
.831437110900879
]
}}
```
#### 7.2 Get the score between speaker audio embedding
...
...
@@ -331,12 +331,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
Output:
```
bash
[
2022-05-
09 10:28:40,556
]
[
INFO] - vector score http client start
[
2022-05-
09 10:28:40,556
]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-
09 10:28:40,556]
[
INFO] - endpoint: http://127.0.0.1:80
90/paddlespeech/vector/score
[
2022-05-
09 10:28:40,731]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.4292638897895813
}}
[
2022-05-
09 10:28:40,731]
[
INFO] - The vector: None
[
2022-05-
09 10:28:40,731]
[
INFO] - Response
time
0.175514
s.
[
2022-05-
25 12:33:24,527
]
[
INFO] - vector score http client start
[
2022-05-
25 12:33:24,527
]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-
25 12:33:24,528]
[
INFO] - endpoint: http://127.0.0.1:87
90/paddlespeech/vector/score
[
2022-05-
25 12:33:24,695]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
[
2022-05-
25 12:33:24,696]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
[
2022-05-
25 12:33:24,696]
[
INFO] - Response
time
0.168271
s.
```
*
Python API
...
...
@@ -358,10 +358,11 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
Output:
```
bash
[
2022-05-09 10:34:54,769]
[
INFO] - vector score http client start
[
2022-05-09 10:34:54,771]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-09 10:34:54,771]
[
INFO] - endpoint: http://127.0.0.1:8090/paddlespeech/vector/score
[
2022-05-09 10:34:55,026]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.4292638897895813
}}
[
2022-05-25 12:30:14,143]
[
INFO] - vector score http client start
[
2022-05-25 12:30:14,143]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-25 12:30:14,143]
[
INFO] - endpoint: http://127.0.0.1:8790/paddlespeech/vector/score
[
2022-05-25 12:30:14,363]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
```
### 8. Punctuation prediction
...
...
demos/speech_server/README_cn.md
浏览文件 @
a83374a7
...
...
@@ -277,12 +277,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
输出:
```
bash
[
2022-05-
08 00:18:44,249
]
[
INFO] - vector http client start
[
2022-05-
08 00:18:44,250
]
[
INFO] - the input audio: 85236145389.wav
[
2022-05-
08 00:18:44,250]
[
INFO] - endpoint: http://127.0.0.1:80
90/paddlespeech/vector
[
2022-05-
08 00:18:44,250]
[
INFO] - http://127.0.0.1:85
90/paddlespeech/vector
[
2022-05-
08 00:18:44,406]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
1.421751856803894, 5.626245498657227,
-5
.342077255249023, 1.1773887872695923, 3.3080549240112305, 1.7565933465957642, 5.167886257171631, 10.806358337402344,
-3
.8226819038391113,
-5
.614140033721924, 2.6238479614257812,
-0
.8072972893714905, 1.9635076522827148,
-7
.312870025634766, 0.011035939678549767,
-9
.723129272460938, 0.6619706153869629,
-6
.976806163787842, 10.213476181030273, 7.494769096374512, 2.9105682373046875, 3.8949244022369385, 3.799983501434326, 7.106168746948242, 16.90532875061035,
-7
.149388313293457, 8.733108520507812, 3.423006296157837,
-4
.831653594970703,
-11
.403363227844238, 11.232224464416504, 7.127461910247803,
-4
.282842636108398, 2.452359437942505,
-5
.130749702453613,
-18
.17766761779785,
-2
.6116831302642822,
-11
.000344276428223,
-6
.731433391571045, 1.6564682722091675, 0.7618281245231628, 1.125300407409668,
-2
.0838370323181152, 4.725743293762207,
-8
.782588005065918,
-3
.5398752689361572, 3.8142364025115967, 5.142068862915039, 2.1620609760284424, 4.09643030166626,
-6
.416214942932129, 12.747446060180664, 1.9429892301559448,
-15
.15294361114502, 6.417416095733643, 16.09701156616211,
-9
.716667175292969,
-1
.9920575618743896,
-3
.36494779586792,
-1
.8719440698623657, 11.567351341247559, 3.6978814601898193, 11.258262634277344, 7.442368507385254, 9.183408737182617, 4.528149127960205,
-1
.2417854070663452, 4.395912170410156, 6.6727728843688965, 5.88988733291626, 7.627128601074219,
-0
.6691966652870178,
-11
.889698028564453,
-9
.20886516571045,
-7
.42740535736084,
-3
.777663230895996, 6.917238712310791,
-9
.848755836486816,
-2
.0944676399230957,
-5
.1351165771484375, 0.4956451654434204, 9.317537307739258,
-5
.914181232452393,
-1
.809860348701477,
-0
.11738915741443634,
-7
.1692705154418945,
-1
.057827353477478,
-5
.721670627593994,
-5
.117385387420654, 16.13765525817871,
-4
.473617076873779, 7.6624321937561035,
-0
.55381840467453, 9.631585121154785,
-6
.470459461212158,
-8
.548508644104004, 4.371616840362549,
-0
.7970245480537415, 4.4789886474609375,
-2
.975860834121704, 3.2721822261810303, 2.838287830352783, 5.134591102600098,
-9
.19079875946045,
-0
.5657302737236023,
-4
.8745832443237305, 2.3165574073791504,
-5
.984319686889648,
-2
.1798853874206543, 0.3554139733314514,
-0
.3178512752056122, 9.493552207946777, 2.1144471168518066, 4.358094692230225,
-12
.089824676513672, 8.451693534851074,
-7
.925466537475586, 4.624246597290039, 4.428936958312988, 18.69200897216797,
-2
.6204581260681152,
-5
.14918851852417,
-0
.3582090139389038, 8.488558769226074, 4.98148775100708,
-9
.326835632324219,
-2
.2544219493865967, 6.641760349273682, 1.2119598388671875, 10.977124214172363, 16.555034637451172, 3.3238420486450195, 9.551861763000488,
-1
.6676981449127197,
-0
.7953944206237793,
-8
.605667114257812,
-0
.4735655188560486, 2.674196243286133,
-5
.359177112579346,
-2
.66738224029541, 0.6660683155059814, 15.44322681427002, 4.740593433380127,
-3
.472534418106079, 11.592567443847656,
-2
.0544962882995605, 1.736127495765686,
-8
.265326499938965,
-9
.30447769165039, 5.406829833984375,
-1
.518022894859314,
-7
.746612548828125,
-6
.089611053466797, 0.07112743705511093,
-0
.3490503430366516,
-8
.64989185333252,
-9
.998957633972168,
-2
.564845085144043,
-0
.5399947762489319, 2.6018123626708984,
-0
.3192799389362335,
-1
.8815255165100098,
-2
.0721492767333984,
-3
.410574436187744,
-8
.29980754852295, 1.483638048171997,
-15
.365986824035645,
-8
.288211822509766, 3.884779930114746,
-3
.4876468181610107, 7.362999439239502, 0.4657334089279175, 3.1326050758361816, 12.438895225524902,
-1
.8337041139602661, 4.532927989959717, 2.7264339923858643, 10.14534854888916,
-6
.521963596343994, 2.897155523300171,
-3
.392582654953003, 5.079153060913086, 7.7597246170043945, 4.677570819854736, 5.845779895782471, 2.402411460876465, 7.7071051597595215, 3.9711380004882812,
-6
.39003849029541, 6.12687873840332,
-3
.776029348373413,
-11
.118121147155762
]
}}
[
2022-05-
08 00:18:44,406]
[
INFO] - Response
time
0.156481
s.
[
2022-05-
25 12:25:36,165
]
[
INFO] - vector http client start
[
2022-05-
25 12:25:36,165
]
[
INFO] - the input audio: 85236145389.wav
[
2022-05-
25 12:25:36,165]
[
INFO] - endpoint: http://127.0.0.1:87
90/paddlespeech/vector
[
2022-05-
25 12:25:36,166]
[
INFO] - http://127.0.0.1:87
90/paddlespeech/vector
[
2022-05-
25 12:25:36,324]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
-1
.3251205682754517, 7.860682487487793,
-4
.620625972747803, 0.3000721037387848, 2.2648534774780273,
-1
.1931440830230713, 3.064713716506958, 7.673594951629639,
-6
.004472732543945,
-12
.024259567260742,
-1
.9496068954467773, 3.126953601837158, 1.6188379526138306,
-7
.638310432434082,
-1
.2299772500991821,
-12
.33833122253418, 2.1373026371002197,
-5
.395712375640869, 9.717328071594238, 5.675230503082275, 3.7805123329162598, 3.0597171783447266, 3.429692029953003, 8.9760103225708, 13.174124717712402,
-0
.5313228368759155, 8.942471504211426, 4.465109825134277,
-4
.426247596740723,
-9
.726503372192383, 8.399328231811523, 7.223917484283447,
-7
.435853958129883, 2.9441683292388916,
-4
.343039512634277,
-13
.886964797973633,
-1
.6346734762191772,
-10
.902740478515625,
-5
.311244964599609, 3.800722122192383, 3.897603750228882,
-2
.123077392578125,
-2
.3521194458007812, 4.151031017303467,
-7
.404866695404053, 0.13911646604537964, 2.4626107215881348, 4.96645450592041, 0.9897574186325073, 5.483975410461426,
-3
.3574001789093018, 10.13400650024414,
-0
.6120170950889587,
-10
.403095245361328, 4.600754261016846, 16.009349822998047,
-7
.78369140625,
-4
.194530487060547,
-6
.93686056137085, 1.1789555549621582, 11.490800857543945, 4.23802375793457, 9.550930976867676, 8.375045776367188, 7.508914470672607,
-0
.6570729613304138,
-0
.3005157709121704, 2.8406054973602295, 3.0828027725219727, 0.7308170199394226, 6.1483540534973145, 0.1376611888408661,
-13
.424735069274902,
-7
.746140480041504,
-2
.322798252105713,
-8
.305252075195312, 2.98791241645813,
-10
.99522876739502, 0.15211068093776703,
-2
.3820347785949707,
-1
.7984174489974976, 8.49562931060791,
-5
.852236747741699,
-3
.755497932434082, 0.6989710927009583,
-5
.270299434661865,
-2
.6188621520996094,
-1
.8828465938568115,
-4
.6466498374938965, 14.078543663024902,
-0
.5495333075523376, 10.579157829284668,
-3
.216050148010254, 9.349003791809082,
-4
.381077766418457,
-11
.675816535949707,
-2
.863020658493042, 4.5721755027771, 2.246612071990967,
-4
.574341773986816, 1.8610187768936157, 2.3767874240875244, 5.625787734985352,
-9
.784077644348145, 0.6496725678443909,
-1
.457950472831726, 0.4263263940811157,
-4
.921126365661621,
-2
.4547839164733887, 3.4869801998138428,
-0
.4265422224998474, 8.341268539428711, 1.356552004814148, 7.096688270568848,
-13
.102828979492188, 8.01673412322998,
-7
.115934371948242, 1.8699780702590942, 0.20872099697589874, 14.699383735656738,
-1
.0252779722213745,
-2
.6107232570648193,
-2
.5082311630249023, 8.427192687988281, 6.913852691650391,
-6
.29124641418457, 0.6157366037368774, 2.489687919616699,
-3
.4668266773223877, 9.92176342010498, 11.200815200805664,
-0
.19664029777050018, 7.491600513458252,
-0
.6231271624565125,
-0
.2584814429283142,
-9
.947997093200684,
-0
.9611040949821472, 1.1649218797683716,
-2
.1907122135162354,
-1
.502848744392395,
-0
.5192610621452332, 15.165953636169434, 2.4649462699890137,
-0
.998044490814209, 7.44166374206543,
-2
.0768048763275146, 3.5896823406219482,
-7
.305543422698975,
-7
.562084674835205, 4.32333517074585, 0.08044180274009705,
-6
.564010143280029,
-2
.314805269241333,
-1
.7642345428466797,
-2
.470881700515747,
-7
.6756181716918945,
-9
.548877716064453,
-1
.017755389213562, 0.1698644608259201, 2.5877134799957275,
-1
.8752295970916748,
-0
.36614322662353516,
-6
.049378395080566,
-2
.3965611457824707,
-5
.945338726043701, 0.9424033164978027,
-13
.155974388122559,
-7
.45780086517334, 0.14658108353614807,
-3
.7427968978881836, 5.841492652893066,
-1
.2872905731201172, 5.569431304931641, 12.570590019226074, 1.0939218997955322, 2.2142086029052734, 1.9181575775146484, 6.991420745849609,
-5
.888138771057129, 3.1409823894500732,
-2
.0036280155181885, 2.4434285163879395, 9.973138809204102, 5.036680221557617, 2.005120277404785, 2.861560344696045, 5.860223770141602, 2.917618751525879,
-1
.63111412525177, 2.0292205810546875,
-4
.070415019989014,
-6
.831437110900879
]
}}
[
2022-05-
25 12:25:36,324]
[
INFO] - Response
time
0.159053
s.
```
*
Python API
...
...
@@ -302,7 +302,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
输出:
```
bash
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
1.421751856803894, 5.626245498657227,
-5
.342077255249023, 1.1773887872695923, 3.3080549240112305, 1.7565933465957642, 5.167886257171631, 10.806358337402344,
-3
.8226819038391113,
-5
.614140033721924, 2.6238479614257812,
-0
.8072972893714905, 1.9635076522827148,
-7
.312870025634766, 0.011035939678549767,
-9
.723129272460938, 0.6619706153869629,
-6
.976806163787842, 10.213476181030273, 7.494769096374512, 2.9105682373046875, 3.8949244022369385, 3.799983501434326, 7.106168746948242, 16.90532875061035,
-7
.149388313293457, 8.733108520507812, 3.423006296157837,
-4
.831653594970703,
-11
.403363227844238, 11.232224464416504, 7.127461910247803,
-4
.282842636108398, 2.452359437942505,
-5
.130749702453613,
-18
.17766761779785,
-2
.6116831302642822,
-11
.000344276428223,
-6
.731433391571045, 1.6564682722091675, 0.7618281245231628, 1.125300407409668,
-2
.0838370323181152, 4.725743293762207,
-8
.782588005065918,
-3
.5398752689361572, 3.8142364025115967, 5.142068862915039, 2.1620609760284424, 4.09643030166626,
-6
.416214942932129, 12.747446060180664, 1.9429892301559448,
-15
.15294361114502, 6.417416095733643, 16.09701156616211,
-9
.716667175292969,
-1
.9920575618743896,
-3
.36494779586792,
-1
.8719440698623657, 11.567351341247559, 3.6978814601898193, 11.258262634277344, 7.442368507385254, 9.183408737182617, 4.528149127960205,
-1
.2417854070663452, 4.395912170410156, 6.6727728843688965, 5.88988733291626, 7.627128601074219,
-0
.6691966652870178,
-11
.889698028564453,
-9
.20886516571045,
-7
.42740535736084,
-3
.777663230895996, 6.917238712310791,
-9
.848755836486816,
-2
.0944676399230957,
-5
.1351165771484375, 0.4956451654434204, 9.317537307739258,
-5
.914181232452393,
-1
.809860348701477,
-0
.11738915741443634,
-7
.1692705154418945,
-1
.057827353477478,
-5
.721670627593994,
-5
.117385387420654, 16.13765525817871,
-4
.473617076873779, 7.6624321937561035,
-0
.55381840467453, 9.631585121154785,
-6
.470459461212158,
-8
.548508644104004, 4.371616840362549,
-0
.7970245480537415, 4.4789886474609375,
-2
.975860834121704, 3.2721822261810303, 2.838287830352783, 5.134591102600098,
-9
.19079875946045,
-0
.5657302737236023,
-4
.8745832443237305, 2.3165574073791504,
-5
.984319686889648,
-2
.1798853874206543, 0.3554139733314514,
-0
.3178512752056122, 9.493552207946777, 2.1144471168518066, 4.358094692230225,
-12
.089824676513672, 8.451693534851074,
-7
.925466537475586, 4.624246597290039, 4.428936958312988, 18.69200897216797,
-2
.6204581260681152,
-5
.14918851852417,
-0
.3582090139389038, 8.488558769226074, 4.98148775100708,
-9
.326835632324219,
-2
.2544219493865967, 6.641760349273682, 1.2119598388671875, 10.977124214172363, 16.555034637451172, 3.3238420486450195, 9.551861763000488,
-1
.6676981449127197,
-0
.7953944206237793,
-8
.605667114257812,
-0
.4735655188560486, 2.674196243286133,
-5
.359177112579346,
-2
.66738224029541, 0.6660683155059814, 15.44322681427002, 4.740593433380127,
-3
.472534418106079, 11.592567443847656,
-2
.0544962882995605, 1.736127495765686,
-8
.265326499938965,
-9
.30447769165039, 5.406829833984375,
-1
.518022894859314,
-7
.746612548828125,
-6
.089611053466797, 0.07112743705511093,
-0
.3490503430366516,
-8
.64989185333252,
-9
.998957633972168,
-2
.564845085144043,
-0
.5399947762489319, 2.6018123626708984,
-0
.3192799389362335,
-1
.8815255165100098,
-2
.0721492767333984,
-3
.410574436187744,
-8
.29980754852295, 1.483638048171997,
-15
.365986824035645,
-8
.288211822509766, 3.884779930114746,
-3
.4876468181610107, 7.362999439239502, 0.4657334089279175, 3.1326050758361816, 12.438895225524902,
-1
.8337041139602661, 4.532927989959717, 2.7264339923858643, 10.14534854888916,
-6
.521963596343994, 2.897155523300171,
-3
.392582654953003, 5.079153060913086, 7.7597246170043945, 4.677570819854736, 5.845779895782471, 2.402411460876465, 7.7071051597595215, 3.9711380004882812,
-6
.39003849029541, 6.12687873840332,
-3
.776029348373413,
-11
.118121147155762
]
}}
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'vec'
:
[
-1
.3251205682754517, 7.860682487487793,
-4
.620625972747803, 0.3000721037387848, 2.2648534774780273,
-1
.1931440830230713, 3.064713716506958, 7.673594951629639,
-6
.004472732543945,
-12
.024259567260742,
-1
.9496068954467773, 3.126953601837158, 1.6188379526138306,
-7
.638310432434082,
-1
.2299772500991821,
-12
.33833122253418, 2.1373026371002197,
-5
.395712375640869, 9.717328071594238, 5.675230503082275, 3.7805123329162598, 3.0597171783447266, 3.429692029953003, 8.9760103225708, 13.174124717712402,
-0
.5313228368759155, 8.942471504211426, 4.465109825134277,
-4
.426247596740723,
-9
.726503372192383, 8.399328231811523, 7.223917484283447,
-7
.435853958129883, 2.9441683292388916,
-4
.343039512634277,
-13
.886964797973633,
-1
.6346734762191772,
-10
.902740478515625,
-5
.311244964599609, 3.800722122192383, 3.897603750228882,
-2
.123077392578125,
-2
.3521194458007812, 4.151031017303467,
-7
.404866695404053, 0.13911646604537964, 2.4626107215881348, 4.96645450592041, 0.9897574186325073, 5.483975410461426,
-3
.3574001789093018, 10.13400650024414,
-0
.6120170950889587,
-10
.403095245361328, 4.600754261016846, 16.009349822998047,
-7
.78369140625,
-4
.194530487060547,
-6
.93686056137085, 1.1789555549621582, 11.490800857543945, 4.23802375793457, 9.550930976867676, 8.375045776367188, 7.508914470672607,
-0
.6570729613304138,
-0
.3005157709121704, 2.8406054973602295, 3.0828027725219727, 0.7308170199394226, 6.1483540534973145, 0.1376611888408661,
-13
.424735069274902,
-7
.746140480041504,
-2
.322798252105713,
-8
.305252075195312, 2.98791241645813,
-10
.99522876739502, 0.15211068093776703,
-2
.3820347785949707,
-1
.7984174489974976, 8.49562931060791,
-5
.852236747741699,
-3
.755497932434082, 0.6989710927009583,
-5
.270299434661865,
-2
.6188621520996094,
-1
.8828465938568115,
-4
.6466498374938965, 14.078543663024902,
-0
.5495333075523376, 10.579157829284668,
-3
.216050148010254, 9.349003791809082,
-4
.381077766418457,
-11
.675816535949707,
-2
.863020658493042, 4.5721755027771, 2.246612071990967,
-4
.574341773986816, 1.8610187768936157, 2.3767874240875244, 5.625787734985352,
-9
.784077644348145, 0.6496725678443909,
-1
.457950472831726, 0.4263263940811157,
-4
.921126365661621,
-2
.4547839164733887, 3.4869801998138428,
-0
.4265422224998474, 8.341268539428711, 1.356552004814148, 7.096688270568848,
-13
.102828979492188, 8.01673412322998,
-7
.115934371948242, 1.8699780702590942, 0.20872099697589874, 14.699383735656738,
-1
.0252779722213745,
-2
.6107232570648193,
-2
.5082311630249023, 8.427192687988281, 6.913852691650391,
-6
.29124641418457, 0.6157366037368774, 2.489687919616699,
-3
.4668266773223877, 9.92176342010498, 11.200815200805664,
-0
.19664029777050018, 7.491600513458252,
-0
.6231271624565125,
-0
.2584814429283142,
-9
.947997093200684,
-0
.9611040949821472, 1.1649218797683716,
-2
.1907122135162354,
-1
.502848744392395,
-0
.5192610621452332, 15.165953636169434, 2.4649462699890137,
-0
.998044490814209, 7.44166374206543,
-2
.0768048763275146, 3.5896823406219482,
-7
.305543422698975,
-7
.562084674835205, 4.32333517074585, 0.08044180274009705,
-6
.564010143280029,
-2
.314805269241333,
-1
.7642345428466797,
-2
.470881700515747,
-7
.6756181716918945,
-9
.548877716064453,
-1
.017755389213562, 0.1698644608259201, 2.5877134799957275,
-1
.8752295970916748,
-0
.36614322662353516,
-6
.049378395080566,
-2
.3965611457824707,
-5
.945338726043701, 0.9424033164978027,
-13
.155974388122559,
-7
.45780086517334, 0.14658108353614807,
-3
.7427968978881836, 5.841492652893066,
-1
.2872905731201172, 5.569431304931641, 12.570590019226074, 1.0939218997955322, 2.2142086029052734, 1.9181575775146484, 6.991420745849609,
-5
.888138771057129, 3.1409823894500732,
-2
.0036280155181885, 2.4434285163879395, 9.973138809204102, 5.036680221557617, 2.005120277404785, 2.861560344696045, 5.860223770141602, 2.917618751525879,
-1
.63111412525177, 2.0292205810546875,
-4
.070415019989014,
-6
.831437110900879
]
}}
```
#### 7.2 音频声纹打分
...
...
@@ -333,12 +333,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
输出:
```
bash
[
2022-05-
09 10:28:40,556
]
[
INFO] - vector score http client start
[
2022-05-
09 10:28:40,556
]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-
09 10:28:40,556]
[
INFO] - endpoint: http://127.0.0.1:80
90/paddlespeech/vector/score
[
2022-05-
09 10:28:40,731]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.4292638897895813
}}
[
2022-05-
09 10:28:40,731]
[
INFO] - The vector: None
[
2022-05-
09 10:28:40,731]
[
INFO] - Response
time
0.175514
s.
[
2022-05-
25 12:33:24,527
]
[
INFO] - vector score http client start
[
2022-05-
25 12:33:24,527
]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-
25 12:33:24,528]
[
INFO] - endpoint: http://127.0.0.1:87
90/paddlespeech/vector/score
[
2022-05-
25 12:33:24,695]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
[
2022-05-
25 12:33:24,696]
[
INFO] - The vector:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
[
2022-05-
25 12:33:24,696]
[
INFO] - Response
time
0.168271
s.
```
*
Python API
...
...
@@ -352,7 +352,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
enroll_audio
=
"85236145389.wav"
,
test_audio
=
"123456789.wav"
,
server_ip
=
"127.0.0.1"
,
port
=
8
0
90
,
port
=
8
7
90
,
task
=
"score"
)
print
(
res
)
```
...
...
@@ -360,10 +360,11 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
输出:
```
bash
[
2022-05-09 10:34:54,769]
[
INFO] - vector score http client start
[
2022-05-09 10:34:54,771]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-09 10:34:54,771]
[
INFO] - endpoint: http://127.0.0.1:8590/paddlespeech/vector/score
[
2022-05-09 10:34:55,026]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.4292638897895813
}}
[
2022-05-25 12:30:14,143]
[
INFO] - vector score http client start
[
2022-05-25 12:30:14,143]
[
INFO] - enroll audio: 85236145389.wav,
test
audio: 123456789.wav
[
2022-05-25 12:30:14,143]
[
INFO] - endpoint: http://127.0.0.1:8790/paddlespeech/vector/score
[
2022-05-25 12:30:14,363]
[
INFO] - The vector score is:
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'score'
: 0.45332613587379456
}}
```
...
...
paddlespeech/server/tests/vector/http_client.py
已删除
100644 → 0
浏览文件 @
7afbdbef
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the
import
base64
import
json
import
time
import
requests
def
readwav2base64
(
wav_file
):
"""
read wave file and covert to base64 string
"""
with
open
(
wav_file
,
'rb'
)
as
f
:
base64_bytes
=
base64
.
b64encode
(
f
.
read
())
base64_string
=
base64_bytes
.
decode
(
'utf-8'
)
return
base64_string
def
main
():
"""
main func
"""
url
=
"http://127.0.0.1:8090/paddlespeech/asr"
# start Timestamp
time_start
=
time
.
time
()
test_audio_dir
=
"./16_audio.wav"
audio
=
readwav2base64
(
test_audio_dir
)
data
=
{
"audio"
:
audio
,
"audio_format"
:
"wav"
,
"sample_rate"
:
16000
,
"lang"
:
"zh_cn"
,
}
r
=
requests
.
post
(
url
=
url
,
data
=
json
.
dumps
(
data
))
# ending Timestamp
time_end
=
time
.
time
()
print
(
'time cost'
,
time_end
-
time_start
,
's'
)
print
(
r
.
json
())
if
__name__
==
"__main__"
:
main
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录