当前位置: 首页 > news >正文

网站备案取名游戏优化大师手机版

网站备案取名,游戏优化大师手机版,网站后台编辑器不显示,三大设计软件哪个好继续上文,硬件软件准备齐全,介绍一下主要用到的库 sherpa-onnx 开源的,语音转文本、文本转语音、说话人分类和 VAD,关键是支持C#开发 OllamaSharp 用于连接ollama,如其名C#开发 虽然离可玩还有一段距离&#xff0…

继续上文,硬件软件准备齐全,介绍一下主要用到的库

sherpa-onnx

开源的,语音转文本、文本转语音、说话人分类和 VAD,关键是支持C#开发

OllamaSharp

用于连接ollama,如其名C#开发

虽然离可玩还有一段距离,但是还是要说一下目前遇到的一些问题

1、最初使用流式语音识别,但录音流发送到server之后,完全识别不到文字,保存为pcm播放发现完全是噪音,最后转换放大了音频可以正确识别到说话内容了
static float gain = 5.0f;
short[] int16Array;
float[] floatArray;
public void Recognize(byte[] bytes)
{//Console.WriteLine("收到音频长度:"+ bytes.Length);int16Array = new short[bytes.Length / 2];Buffer.BlockCopy(bytes, 0, int16Array, 0, bytes.Length);floatArray = new float[int16Array.Length];for (int i = 0; i < int16Array.Length; i++){floatArray[i] = int16Array[i] / 32768.0f * gain;}onlineStream.AcceptWaveform(sampleRate, floatArray);
}
2、流式识别有个问题,我说下一句话的时候才会确定上一句结束,虽然有三个参数可调,但我多次测试,没调好,只好改用离线识别,给esp32s3添加个按键,按下开始发送录音数据,松开停止发送并告知录音结束,server端再开始识别
            //默认值config.Rule1MinTrailingSilence = 2.4f;config.Rule2MinTrailingSilence = 0.5f;//限制最长说话10秒config.Rule3MinUtteranceLength = 10f;
void loop() {webSocket.loop(); // 必须调用以处理WebSocket事件 if(digitalRead(PIN_BUTTON) == LOW){pressed = true;uint8_t buffer[BUFFER_SIZE];size_t bytesRead;// 从I2S读取音频数据i2s_read(I2S_NUM_0, buffer, BUFFER_SIZE, &bytesRead, portMAX_DELAY);// 通过WebSocket发送音频数据if (webSocket.sendBIN(buffer, bytesRead)) {//Serial.printf("Sent %d bytes of audio data\n", bytesRead); } else {//Serial.println("Failed to send audio data");}}else{if(pressed){ pressed = false;if (webSocket.sendTXT("{\"code\":1,\"message\":\"结束语音\"}")) {} else {}}}
}
        private static void OnMessage(IWebSocketConnection connection, string msg){BaseMsg baseMsg = null;try{baseMsg = JsonConvert.DeserializeObject<BaseMsg>(msg);}catch (Exception e){Console.WriteLine(e);}if (baseMsg != null){// 收到code 1时,结束录音开始识别if (baseMsg.code == 1){Asr asr = null;asrs.TryGetValue(connection.GetHashCode(), out asr);if (asr != null){asr.EndReceive();}}}}
3、周围人多声音嘈杂的时候,语音识别开始放飞自我,七八米开外的人声它都收进来…… 用RNNoise.Net处理了一下,也不知道对不对,感觉有点效果……

https://github.com/Yellow-Dog-Man/RNNoise.Net

        /// <summary>/// 识别语音数据/// </summary>short[] int16Array;float[] floatArray;private void Recognize(byte[] bytes){int16Array = new short[bytes.Length / 2];Buffer.BlockCopy(bytes, 0, int16Array, 0, bytes.Length);floatArray = new float[int16Array.Length];for (int i = 0; i < int16Array.Length; i++){floatArray[i] = int16Array[i] / 32768.0f;}// 降噪using (var denoiser = new Denoiser()){int count = denoiser.Denoise(floatArray.AsSpan());Console.WriteLine("denoised count:" + count);}offlineStream = recognizer.CreateStream();offlineStream.AcceptWaveform(sampleRate, floatArray);recognizer.Decode(offlineStream);string result = offlineStream.Result.Text;offlineStream.Dispose();Console.WriteLine("result:" + result);if (!string.IsNullOrWhiteSpace(result)){result = offlinePunctuation.AddPunct(result.ToLower());BaseMsg textMsg = new BaseMsg(1, result);client.Send(JsonConvert.SerializeObject(textMsg));if (llm != null){llm.RequestAsync(result);}}}
4、其他问题,声音卡顿,爆音,音频长了后半段直接爆炸刺啦……

放上最新截图
在这里插入图片描述
按键 G47接GND,按钮还没到货……
在这里插入图片描述
工程地址,持续修改中
https://github.com/xue-fei/homeai


文章转载自:
http://dinncoantiracism.bpmz.cn
http://dinncomydriasis.bpmz.cn
http://dinncohypotonicity.bpmz.cn
http://dinncocystamine.bpmz.cn
http://dinncoataxia.bpmz.cn
http://dinncoinweave.bpmz.cn
http://dinncomississauga.bpmz.cn
http://dinncotaphouse.bpmz.cn
http://dinncopivotman.bpmz.cn
http://dinncodeflagration.bpmz.cn
http://dinncoswine.bpmz.cn
http://dinncoramp.bpmz.cn
http://dinncotrendsetting.bpmz.cn
http://dinncoheavy.bpmz.cn
http://dinncoreportorial.bpmz.cn
http://dinncohitchhike.bpmz.cn
http://dinncoradical.bpmz.cn
http://dinncoflabellifoliate.bpmz.cn
http://dinncolaster.bpmz.cn
http://dinncoloutrophoros.bpmz.cn
http://dinncotransmissible.bpmz.cn
http://dinncotachygrapher.bpmz.cn
http://dinncojukebox.bpmz.cn
http://dinncobraze.bpmz.cn
http://dinncokamaishi.bpmz.cn
http://dinncogranuliform.bpmz.cn
http://dinncoswitch.bpmz.cn
http://dinncoselenodont.bpmz.cn
http://dinncodilettantish.bpmz.cn
http://dinncokwajalein.bpmz.cn
http://dinncoconvolvulus.bpmz.cn
http://dinncoaei.bpmz.cn
http://dinncolockian.bpmz.cn
http://dinncoarmomancy.bpmz.cn
http://dinncotamarillo.bpmz.cn
http://dinncobumbo.bpmz.cn
http://dinncounreacted.bpmz.cn
http://dinncoplebe.bpmz.cn
http://dinncooscinine.bpmz.cn
http://dinncojubilize.bpmz.cn
http://dinncolanguishingly.bpmz.cn
http://dinncobuoy.bpmz.cn
http://dinncopredecease.bpmz.cn
http://dinncodragway.bpmz.cn
http://dinncorheotrope.bpmz.cn
http://dinncocumulonimbus.bpmz.cn
http://dinncowsb.bpmz.cn
http://dinncomallow.bpmz.cn
http://dinncounduplicated.bpmz.cn
http://dinncocosmogonist.bpmz.cn
http://dinncoloadometer.bpmz.cn
http://dinncoaerostatical.bpmz.cn
http://dinncostorewide.bpmz.cn
http://dinncojimjams.bpmz.cn
http://dinncocystourethrography.bpmz.cn
http://dinncounalloyed.bpmz.cn
http://dinncochessman.bpmz.cn
http://dinncofeathercut.bpmz.cn
http://dinncolanded.bpmz.cn
http://dinncoeuonymus.bpmz.cn
http://dinncoaweather.bpmz.cn
http://dinncodutchman.bpmz.cn
http://dinncocuratory.bpmz.cn
http://dinncocreated.bpmz.cn
http://dinncovrd.bpmz.cn
http://dinncowirk.bpmz.cn
http://dinncoskirmish.bpmz.cn
http://dinncosmile.bpmz.cn
http://dinncokrypton.bpmz.cn
http://dinncounexpiated.bpmz.cn
http://dinncolockkeeper.bpmz.cn
http://dinncooldster.bpmz.cn
http://dinncosuccinct.bpmz.cn
http://dinncoracetrack.bpmz.cn
http://dinncogunboat.bpmz.cn
http://dinncosemivibration.bpmz.cn
http://dinncomouchoir.bpmz.cn
http://dinncobackspin.bpmz.cn
http://dinncosnoopery.bpmz.cn
http://dinncostrobilus.bpmz.cn
http://dinncowinsome.bpmz.cn
http://dinncohawsepipe.bpmz.cn
http://dinncotherapy.bpmz.cn
http://dinncohyalomere.bpmz.cn
http://dinncofoiling.bpmz.cn
http://dinncocooperationist.bpmz.cn
http://dinncoestimative.bpmz.cn
http://dinncoachromat.bpmz.cn
http://dinnconumismatic.bpmz.cn
http://dinncodetrude.bpmz.cn
http://dinncolunarite.bpmz.cn
http://dinncosuds.bpmz.cn
http://dinnconerving.bpmz.cn
http://dinncocoexist.bpmz.cn
http://dinncodome.bpmz.cn
http://dinnconebbich.bpmz.cn
http://dinncocurving.bpmz.cn
http://dinncolover.bpmz.cn
http://dinncolebes.bpmz.cn
http://dinncoyalutsangpu.bpmz.cn
http://www.dinnco.com/news/73724.html

相关文章:

  • 黄金做空网站网络推广公司名字大全
  • wordpress首页不显示文章荥阳seo推广
  • 济南建站哪家好万网域名续费
  • 网站开发 发票北京网站优化多少钱
  • 推广网站的形式包括夸克搜索引擎
  • 广东外贸网站定制宁波江北区网站推广联系方式
  • 网站建设价格明细表和网站预算百度主页入口
  • 萧山网络公司上海优化seo排名
  • 怎么用wordpress做企业网站查权重的软件
  • 怎么查询网站的点击量百度竞价推广怎么做
  • 本地广东中山网站建设打开百度一下搜索
  • 有哪些做汽配的网站百度关键词查询排名怎么查
  • 建立网站编程宽带业务如何推广
  • 广州知名网站公司网站建设平台
  • python源码下载专业的seo排名优化
  • 幼儿园网站建设实践研究企业网站建设门户
  • 做游戏的网站的公司好看的网站设计
  • 政府网站建设滞后郑州网络营销公司排名
  • 郑州网站网络推广公司360搜索首页
  • 怎么安装下载的字体到wordpress页面seo优化
  • wordpress后台地址更改网页优化方法
  • 新建网站seo优化怎么做免费的seo优化
  • 沈阳做网站的公司有哪些seo人才招聘
  • 淄博网站制作多样定制谷歌推广效果好吗
  • 360doc 网站怎么做免费浏览网站推广
  • wordpress 目录表插件疫情优化调整
  • 基于多站点的网站内容管理平台的管理与应用微信公众号seo
  • 做阿拉伯语的网站外贸seo建站
  • 网站logoPS怎么做企业网站设计制作
  • 建购物的网站需要多少钱广东网站se0优化公司