购物网站的做多少个网站
购物网站的做,多少个网站,设计师交流平台有哪些,网站的建设进入哪个科目霖中呐霞二、安装方式
推荐通过 NuGet 包管理器进行安装#xff0c;以下为两种具体安装途径#xff1a;
#xff08;一#xff09;使用 Package Manager Console
在 Visual Studio 的「Package Manager Console」中执行以下命令#xff1a;
Install-Package ManySpeech.Al…霖中呐霞二、安装方式推荐通过 NuGet 包管理器进行安装以下为两种具体安装途径一使用 Package Manager Console在 Visual Studio 的「Package Manager Console」中执行以下命令Install-Package ManySpeech.AliParaformerAsr二使用.NET CLI在命令行中输入以下命令来安装dotnet add package ManySpeech.AliParaformerAsr三手动安装在 NuGet 包管理器界面搜索「ManySpeech.AliParaformerAsr」点击「安装」即可。三、配置说明参考asr.yaml 文件用于解码的 asr.yaml 配置文件中大部分参数无需改动不过存在可修改的特定参数use_itn: true在使用 sensevoicesmall 模型配置时开启此参数即可实现逆文本正则化功能例如可将类似“123”这样的文本转换为“一百二十三”让识别结果的文本表达更符合常规阅读习惯。四、代码调用方法一离线非流式模型调用添加项目引用 在代码中添加以下引用using ManySpeech.AliParaformerAsr;using ManySpeech.AliParaformerAsr.Model;模型初始化和配置paraformer 模型初始化方式string applicationBase AppDomain.CurrentDomain.BaseDirectory;string modelName speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx;string modelFilePath applicationBase ./ modelName /model_quant.onnx;string configFilePath applicationBase ./ modelName /asr.yaml;string mvnFilePath applicationBase ./ modelName /am.mvn;string tokensFilePath applicationBase ./ modelName /tokens.txt;OfflineRecognizer offlineRecognizer new OfflineRecognizer(modelFilePath, configFilePath, mvnFilePath, tokensFilePath);SeACo-paraformer 模型初始化方式首先需在模型目录下找到 hotword.txt 文件并按照每行一个中文词汇的格式添加自定义热词例如添加行业术语、特定人名等热词内容。然后在代码中新增相关参数示例如下string applicationBase AppDomain.CurrentDomain.BaseDirectory;string modelName paraformer-seaco-large-zh-timestamp-onnx-offline;string modelFilePath applicationBase ./ modelName /model.int8.onnx;string modelebFilePath applicationBase ./ modelName /model_eb.int8.onnx;string configFilePath applicationBase ./ modelName /asr.yaml;string mvnFilePath applicationBase ./ modelName /am.mvn;string hotwordFilePath applicationBase ./ modelName /hotword.txt;string tokensFilePath applicationBase ./ modelName /tokens.txt;OfflineRecognizer offlineRecognizer new OfflineRecognizer(modelFilePath: modelFilePath, configFilePath: configFilePath, mvnFilePath, tokensFilePath: tokensFilePath, modelebFilePath: modelebFilePath, hotwordFilePath: hotwordFilePath);调用过程List samples new List();//此处省略将 wav 文件转换为 samples 的相关代码详细可参考 ManySpeech.AliParaformerAsr.Examples 示例代码List streams new List();foreach (var sample in samples){OfflineStream stream offlineRecognizer.CreateOfflineStream();stream.AddSamples(sample);streams.Add(stream);}List results offlineRecognizer.GetResults(streams);输出结果示例欢迎大家来体验达摩院推出的语音识别模型非常的方便但是现在不同啊英国脱欧欧盟内部完善的产业链的红利人he must be home now for the light is on他一定在家因为灯亮着就是有一种推理或者解释的那种感觉elapsed_milliseconds:1502.8828125total_duration:40525.6875rtf:0.037084696280599808二实时流式模型调用添加项目引用 同样在代码中添加以下引用using ManySpeech.AliParaformerAsr;using ManySpeech.AliParaformerAsr.Model;模型初始化和配置string encoderFilePath applicationBase ./ modelName /encoder.int8.onnx;string decoderFilePath applicationBase ./ modelName /decoder.int8.onnx;string configFilePath applicationBase ./ modelName /asr.yaml;string mvnFilePath applicationBase ./ modelName /am.mvn;string tokensFilePath applicationBase ./ modelName /tokens.txt;OnlineRecognizer onlineRecognizer new OnlineRecognizer(encoderFilePath, decoderFilePath, configFilePath, mvnFilePath, tokensFilePath);调用过程List samples new List();//此处省略将 wav 文件转换为 samples 的相关代码以下是批处理示意代码List streams new List();OnlineStream stream onlineRecognizer.CreateOnlineStream();foreach (var sample in samples){OnlineStream stream onlineRecognizer.CreateOnlineStream();stream.AddSamples(sample);streams.Add(stream);}List results onlineRecognizer.GetResults(streams);//单处理示例只需构建一个 streamOnlineStream stream onlineRecognizer.CreateOnlineStream();stream.AddSamples(sample);OnlineRecognizerResultEntity result onlineRecognizer.GetResult(stream);//具体可参考 ManySpeech.AliParaformerAsr.Examples 示例代码输出结果示例正是因为存在绝对正义所以我我接受现实式相对生但是不要因因现实的相对对正义们就就认为这个世界有有证因为如果当你认为这这个界界elapsed_milliseconds:1389.3125total_duration:13052rtf:0.10644441464909593五、相关工程语音端点检测为解决长音频合理切分问题可添加 ManySpeech.AliFsmnVad 库通过以下命令安装dotnet add package ManySpeech.AliFsmnVad文本标点预测针对识别结果缺乏标点的情况可添加 ManySpeech.AliCTTransformerPunc 库安装命令如下dotnet add package ManySpeech.AliCTTransformerPunc具体的调用示例可参考对应库的官方文档或者 ManySpeech.AliParaformerAsr.Examples 项目。该项目是一个控制台/桌面端示例项目主要用于展示语音识别的基础功能像离线转写、实时识别等操作。六、其他说明测试用例以 ManySpeech.AliParaformerAsr.Examples 作为测试用例。测试 CPU使用的测试 CPU 为 Intel? Core? i7-10750H CPU 2.60GHz2.59 GHz。支持平台WindowsWindows 7 SP1 及更高版本。macOSmacOS 10.13 (High Sierra) 及更高版本也支持 ios 等。Linux适用于 Linux 发行版但需要满足特定的依赖关系详见.NET 6 支持的 Linux 发行版列表。Android支持 Android 5.0 (API 21) 及更高版本。七、模型下载支持的 ONNX 模型以下是 ManySpeech.AliParaformerAsr 所支持的 ONNX 模型相关信息包含模型名称、类型、支持语言、标点情况、时间戳情况以及下载地址等内容方便根据具体需求选择合适的模型进行下载使用模型名称 类型 支持语言 标点 时间戳 下载地址paraformer-large-zh-en-onnx-offline 非流式 中文、英文 否 否 (https://huggingface.co/manyeyes/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx ), (https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-en-onnx-offline )paraformer-large-zh-en-timestamp-onnx-offline 非流式 中文、英文 否 是 https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-en-timestamp-onnx-offlineparaformer-large-en-onnx-offline 非流式 英文 否 否 https://www.modelscope.cn/models/manyeyes/paraformer-large-en-onnx-offlineparaformer-large-zh-en-onnx-online 流式 中文、英文 否 否 https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-en-onnx-onlineparaformer-large-zh-yue-en-timestamp-onnx-offline-dengcunqin-20240805 非流式 中文、粤语、英文 否 是 https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-yue-en-timestamp-onnx-offline-dengcunqin-20240805paraformer-large-zh-yue-en-onnx-offline-dengcunqin-20240805 非流式 中文、粤语、英文 否 否 https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-yue-en-onnx-offline-dengcunqin-20240805paraformer-large-zh-yue-en-onnx-online-dengcunqin-20240208 流式 中文、粤语、英文 否 否 https://www.modelscope.cn/models/manyeyes/paraformer-large-zh-yue-en-onnx-online-dengcunqin-20240208paraformer-seaco-large-zh-timestamp-onnx-offline 非流式 中文、热词 否 是 https://www.modelscope.cn/models/manyeyes/paraformer-seaco-large-zh-timestamp-onnx-offlineSenseVoiceSmall 非流式 中文、粤语、英文、日语、韩语 是 否 https://www.modelscope.cn/models/manyeyes/sensevoice-small-onnx, https://www.modelscope.cn/models/manyeyes/sensevoice-small-split-embed-onnxsensevoice-small-wenetspeech-yue-int8-onnx 非流式 粤语、中文、英文、日语、韩语 是 否 https://www.modelscope.cn/models/manyeyes/sensevoice-small-wenetspeech-yue-int8-onnx八、模型介绍一模型用途Paraformer 是由达摩院语音团队提出的一种高效的非自回归端到端语音识别框架本项目中的 Paraformer 中文通用语音识别模型采用工业级数万小时的标注音频进行训练这使得模型具备良好的通用识别效果可广泛应用于语音输入法、语音导航、智能会议纪要等多种场景且有着较高的识别准确率。二模型结构Paraformer 模型结构主要由 Encoder、Predictor、Sampler、Decoder 以及 Loss function 这五部分构成其结构示意图可查看此处各部分具体功能如下Encoder它可以采用不同的网络结构像 self-attention、conformer、SAN-M 等主要负责提取音频中的声学特征。Predictor是一个两层的 FFN前馈神经网络其作用在于预测目标文字的个数并且抽取目标文字对应的声学向量为后续的识别处理提供关键数据。Sampler属于无可学习参数模块它能够依据输入的声学向量和目标向量生成含有语义的特征向量以此来丰富识别的语义信息。Decoder结构与自回归模型类似但它是双向建模自回归模型为单向建模通过双向的结构能够更好地对上下文进行建模提升语音识别的准确性。Loss function除了包含交叉熵CE与 MWER最小词错误率这两个区分性优化目标外还涵盖了 Predictor 优化目标 MAE平均绝对误差通过这些优化目标来保障模型的精度。三主要核心点Predictor 模块基于 Continuous integrate-and-fire (CIF) 的预测器Predictor来抽取目标文字对应的声学特征向量借助这种方式能够更为精准地预测语音中目标文字的个数提高语音识别的准确性。Sampler通过采样操作将声学特征向量与目标文字向量变换为含有语义信息的特征向量然后与双向的 Decoder 配合能够显著增强模型对于上下文的理解和建模能力使识别结果更符合语义逻辑。基于负样本采样的 MWER 训练准则这一训练准则有助于模型在训练过程中更好地优化参数减少识别错误提升整体的识别性能。四更详细的资料模型链接paraformer-large-offline非流式paraformer-large-online流式SenseVoiceSmall非流式论文 Paraformer: Fast and Accurate Parallel Transformer for Non-autoregressive End-to-End Speech Recognition论文解读Paraformer: 高识别率、高计算效率的单轮非自回归端到端语音识别模型