{"id":711,"date":"2024-03-21T13:05:19","date_gmt":"2024-03-21T04:05:19","guid":{"rendered":"https:\/\/elosove.com\/?p=711"},"modified":"2024-06-03T09:06:59","modified_gmt":"2024-06-03T00:06:59","slug":"reazonspeech-v2%e3%82%92windows%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e7%92%b0%e5%a2%83%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%99","status":"publish","type":"post","link":"https:\/\/elosove.com\/?p=711","title":{"rendered":"ReazonSpeech v2\u3092Windows\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u52d5\u304b\u3059"},"content":{"rendered":"\n<p>\u97f3\u58f0\u8a8d\u8b58\u30e2\u30c7\u30eb\u306e<a href=\"https:\/\/elosove.com\/?p=692\">rinna nekomata-14b\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u306b\u5f15\u304d\u7d9a\u304dReazonSpeech v2(NeMo\u7248)\u3092\u52d5\u304b\u3057\u3066\u307f\u305f\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30e1\u30e2\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>huggingface\u304b\u3089\u306e\u30e2\u30c7\u30eb\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u6642\u306b\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u5207\u65ad[WinError 10054]\u3055\u308c\u308b\u4eba\u5411\u3051\u306e\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u884c\u74b0\u5883\u306f\u4e0b\u8a18\u3067\u3059\u304c\u3001VRAM\u306f3GB\u7a0b\u5ea6\u306e\u6d88\u8cbb\u91cf\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>windows 11<\/p>\n\n\n\n<p>RAM 64GB<\/p>\n\n\n\n<p>VRAM 16GB (RXT4090 laptop)<\/p>\n<\/blockquote>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u516c\u5f0f : <a href=\"https:\/\/research.reazon.jp\/projects\/ReazonSpeech\/howto.html#nemo-asr\">Python\u304b\u3089\u97f3\u58f0\u8a8d\u8b58\u30e2\u30c7\u30eb\u3092\u5229\u7528\u3059\u308b<\/a><\/p>\n\n\n\n<p>Hugging Face : <a href=\"https:\/\/huggingface.co\/reazon-research\/reazonspeech-nemo-v2\">reazonspeech-nemo-v2<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5148\u305a\u306fffmpeg\u304c\u8981\u308b\u305d\u3046\u306a\u306e\u3067ffmpeg\u3092<\/strong><a href=\"https:\/\/ffmpeg.org\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3002<\/li>\n\n\n\n<li><strong>\u6b21\u306fCython\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong>\n<ul class=\"wp-block-list\">\n<li>torch\u306f2.2.1+cu118\u304c\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u524d\u63d0\u3067\u9032\u3081\u307e\u3059<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"pip install Cython\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">pip<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">install<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">Cython<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>github\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092clone<\/strong><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"git clone https:\/\/github.com\/reazon-research\/ReazonSpeech\n\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">git<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">clone<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">https:\/\/github.com\/reazon-research\/ReazonSpeech<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>transcribe.py\u306e\u4fee\u6b63(windows\u7528\u306e\u30db\u30b9\u30c8\u5207\u65ad\u5bfe\u7b56)<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u30e2\u30c7\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\n<ul class=\"wp-block-list\">\n<li>Hugging Face\u304b\u3089\u30e2\u30c7\u30eb\u3092\u76f4\u63a5<a href=\"https:\/\/huggingface.co\/reazon-research\/reazonspeech-nemo-v2\/tree\/main\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>(\u30e2\u30c7\u30eb\u540d : reazonspeech-nemo-v2.nemo)\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u63db\u3048\n<ul class=\"wp-block-list\">\n<li>ReazonSpeech\\pkg\\nemo-asr\\src\u306e\u4e2d\u306b\u3042\u308btranscribe.py\u306e27\u884c\u76ee\u3092\u4e0b\u8a18\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30e2\u30c7\u30eb\u306e\u30d1\u30b9\u3092\u8a18\u5165\u3059\u308b\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"#line27 \u4fee\u6b63\u524d\nreturn EncDecRNNTBPEModel.from_pretrained('reazon-research\/reazonspeech-nemo-v2',\n\n#line27 \u4fee\u6b63\u5f8c\nreturn EncDecRNNTBPEModel.restore_from(restore_path='Pass to Model .nemo',\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A9955\">#line27 \u4fee\u6b63\u524d<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C586C0\">return<\/span><span style=\"color: #D4D4D4\"> EncDecRNNTBPEModel.from_pretrained(<\/span><span style=\"color: #DCDCAA\">&#39;reazon-research\/reazonspeech-nemo-v2&#39;<\/span><span style=\"color: #DCDCAA\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">#line27 \u4fee\u6b63\u5f8c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C586C0\">return<\/span><span style=\"color: #D4D4D4\"> EncDecRNNTBPEModel.restore_from(<\/span><span style=\"color: #9CDCFE\">restore_path<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&#39;Pass to Model .nemo&#39;,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u306b\u3088\u308a\u5143\u3005\u306fNeMo tools\u306efrom_pretraind\u30e1\u30bd\u30c3\u30c9\u3067\u30e2\u30c7\u30eb\u3092\u843d\u3068\u3057\u3066\u3044\u305f\u306e\u306b\u5bfe\u3057\u3066\u3001restore_from\u30e1\u30bd\u30c3\u30c9\u3067\u76f4\u63a5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30e2\u30c7\u30eb\u3092\u6307\u5b9a\u3057\u3066\u5c55\u958b\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>(\u53c2\u8003 : <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/nemo\/user-guide\/docs\/en\/main\/asr\/results.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.nvidia.com\/deeplearning\/nemo\/user-guide\/docs\/en\/main\/asr\/results.html<\/a>)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/li>\n<\/ul>\n\n\n\n<p>transcribe.py\u3092\u4fee\u6b63\u3057\u305f\u3089\u6700\u521d\u306bgit clone\u3092\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u623b\u3063\u3066\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"pip install ReazonSpeech\/pkg\/nemo-asr\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">pip<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">install<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">ReazonSpeech\/pkg\/nemo-asr<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u52d5\u304b\u3059<\/h2>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u516c\u5f0f\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u304c\u52d5\u4f5c\u3057\u305f\u3089\u6210\u529f\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"from reazonspeech.nemo.asr import load_model, transcribe, audio_from_path\n\n# \u5b9f\u884c\u6642\u306bHugging Face\u304b\u3089\u30e2\u30c7\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059 (2.3GB)\nmodel = load_model(device='cuda')\n\n# \u30ed\u30fc\u30ab\u30eb\u306e\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\naudio = audio_from_path('speech-001.wav')\n\n# \u97f3\u58f0\u8a8d\u8b58\u3092\u9069\u7528\u3059\u308b\nret = transcribe(model, audio)\n\nprint(ret.text)\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">from<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">reazonspeech.nemo.asr<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">import<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">load_model,<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">transcribe,<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">audio_from_path<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\"># \u5b9f\u884c\u6642\u306bHugging Face\u304b\u3089\u30e2\u30c7\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059 (2.3GB)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">model<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">=<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">load_model<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">device<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&#39;cuda&#39;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\"># \u30ed\u30fc\u30ab\u30eb\u306e\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">audio<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">=<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">audio_from_path<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">&#39;speech-001.wav&#39;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\"># \u97f3\u58f0\u8a8d\u8b58\u3092\u9069\u7528\u3059\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">ret<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">=<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">transcribe<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">model,<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">audio<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">print<\/span><span style=\"color: #D4D4D4\">(ret.text)<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u97f3\u58f0\u8a8d\u8b58\u30e2\u30c7\u30eb\u306erinna nekomata-14b\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5f15\u304d\u7d9a\u304dReazonSpeech v2(NeMo\u7248)\u3092\u52d5\u304b\u3057\u3066\u307f\u305f\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30e1\u30e2\u3092\u66f8\u304d\u307e\u3059\u3002 huggingface\u304b\u3089\u306e\u30e2\u30c7\u30eb\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u6642\u306b\u30ea [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":657,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[29,24],"class_list":["post-711","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-reazonspeech","tag-24"],"_links":{"self":[{"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elosove.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=711"}],"version-history":[{"count":10,"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/posts\/711\/revisions\/1038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elosove.com\/index.php?rest_route=\/wp\/v2\/media\/657"}],"wp:attachment":[{"href":"https:\/\/elosove.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elosove.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elosove.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}