<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AI &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/category/ai/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Wed, 17 Sep 2025 14:29:50 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创] 用Whisper.cpp在本地(离线)把mp3音频转成中文</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e7%94%a8whisper-cpp%e5%9c%a8%e6%9c%ac%e5%9c%b0%e7%a6%bb%e7%ba%bf%e6%8a%8amp3%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%88%90%e4%b8%ad%e6%96%87/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e7%94%a8whisper-cpp%e5%9c%a8%e6%9c%ac%e5%9c%b0%e7%a6%bb%e7%ba%bf%e6%8a%8amp3%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%88%90%e4%b8%ad%e6%96%87/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Wed, 17 Sep 2025 14:29:50 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[ASR]]></category>
		<category><![CDATA[mp3转中文]]></category>
		<category><![CDATA[OpenAI]]></category>
		<category><![CDATA[whisper.cpp]]></category>
		<category><![CDATA[Whisper模型]]></category>
		<category><![CDATA[语音识别]]></category>
		<category><![CDATA[语音转文字]]></category>
		<guid isPermaLink="false">https://www.codelast.com/?p=14183</guid>

					<description><![CDATA[<p>如果你有把mp3音频转成中文文本、并且不想调用任何云端API的需求，那么本文提供了一个可行的方案。<br />
OS：Ubuntu 20.04 LTS（MacOS类似可用）<br />
<span id="more-14183"></span></p>
<div style="text-align: center;">
	<img decoding="async" alt="audio to text" src="https://www.codelast.com/wp-content/uploads/2025/09/audio_to_text.png" style="width: 600px; height: 528px;" /></div>
<p>
我们首先要知道几个背景知识：<br />
<span style="color:#ff0000;">➤</span> whisper.cpp 是一个开源的 C/C++ 实现，用于运行 OpenAI 的 Whisper 模型。Whisper 是一种先进的自动语音识别（Automatic Speech Recognition, ASR）神经网络模型，能够将音频转换为文本。它支持多种语言，识别效果精准，并且可以完全离线运行，无需互联网连接。这个项目特别适合嵌入到各种应用程序中，因为它是轻量级的实现，可以在 CPU 上高效运行。<br />
<span style="color: rgb(255, 0, 0);">➤</span>&#160;whisper.cpp-cli 是对 whisper.cpp 命令行工具的 Python 封装。<br />
<span style="color:#ff0000;">➤</span>&#160;OpenAI 的 Whisper 模型是一个先进的自动语音识别系统。它是基于 Transformer 架构的神经网络模型，主要用于将音频转换为文本。Whisper 由 OpenAI 开源开发，使用了大规模的多语言数据集进行训练（包括 68 万小时的音频数据，支持 98 种语言），因此具有出色的准确性和鲁棒性，能够处理多种口音、背景噪音和技术术语。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e7%94%a8whisper-cpp%e5%9c%a8%e6%9c%ac%e5%9c%b0%e7%a6%bb%e7%ba%bf%e6%8a%8amp3%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%88%90%e4%b8%ad%e6%96%87/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>如果你有把mp3音频转成中文文本、并且不想调用任何云端API的需求，那么本文提供了一个可行的方案。<br />
OS：Ubuntu 20.04 LTS（MacOS类似可用）<br />
<span id="more-14183"></span></p>
<div style="text-align: center;">
	<img decoding="async" alt="audio to text" src="https://www.codelast.com/wp-content/uploads/2025/09/audio_to_text.png" style="width: 600px; height: 528px;" /></div>
<p>
我们首先要知道几个背景知识：<br />
<span style="color:#ff0000;">➤</span> whisper.cpp 是一个开源的 C/C++ 实现，用于运行 OpenAI 的 Whisper 模型。Whisper 是一种先进的自动语音识别（Automatic Speech Recognition, ASR）神经网络模型，能够将音频转换为文本。它支持多种语言，识别效果精准，并且可以完全离线运行，无需互联网连接。这个项目特别适合嵌入到各种应用程序中，因为它是轻量级的实现，可以在 CPU 上高效运行。<br />
<span style="color: rgb(255, 0, 0);">➤</span>&nbsp;whisper.cpp-cli 是对 whisper.cpp 命令行工具的 Python 封装。<br />
<span style="color:#ff0000;">➤</span>&nbsp;OpenAI 的 Whisper 模型是一个先进的自动语音识别系统。它是基于 Transformer 架构的神经网络模型，主要用于将音频转换为文本。Whisper 由 OpenAI 开源开发，使用了大规模的多语言数据集进行训练（包括 68 万小时的音频数据，支持 98 种语言），因此具有出色的准确性和鲁棒性，能够处理多种口音、背景噪音和技术术语。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
因此，我们需要安装的是 <a href="https://github.com/charliermarsh/whisper.cpp-cli" target="_blank">whisper.cpp-cli</a>，并且要下载好 Whisper 模型文件，这样就能使用 whisper.cpp-cli 来调用Whisper模型文件进行语音识别了。<br />
为了不影响系统里安装的软件，我们通常都会用micromamba、uv之类的Python包管理器创建一个新的env（环境），然后在里面再安装其他的Python包。这里我们用uv，你也可以用其他的包管理器来创建env。</p>
<blockquote>
<p>
		mkdir whisper<br />
		cd whisper<br />
		uv venv . --python 3.8&nbsp; # 创建一个新环境<br />
		source&nbsp;bin/activate&nbsp; # 激活环境<br />
		uv pip install pip&nbsp; # 安装pip<br />
		pip install whisper.cpp-cli&nbsp; # 安装whisper.cpp-cli</p>
</blockquote>
<p>
这样我们就安装好了相关软件。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
把 mp3 转成 16 kHz 的 wav 文件：</p>
<blockquote>
<p>
		ffmpeg -y -i /home/codelast/st.mp3 -ar 16000 /home/codelast/st.wav</p>
</blockquote>
<p>注意，16 kHz 是Whisper要求的。</p>
<p>然后我们就可以开始做语音识别了：</p>
<blockquote>
<p>
		&nbsp;whisper-cpp -m ../whisper.cpp/download/x-ggml-model.zh.bin -f /home/codelast/st.wav -l zh --output-txt</p>
</blockquote>
<p>这个命令的参数：<br />
-m：指定使用 x-ggml-model.zh.bin 这个模型来做语音识别（模型文件要提前从 Hugging Face 上下载好）<br />
-f：指定输入文件，对 st.wav 这个音频文件进行语音识别<br />
-l：指定输出语言为中文<br />
--output-txt：直接输出txt文本。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
输出内容示例如下：</p>
<blockquote>
<div>
		whisper_init_from_file_with_params_no_state: loading model from &#39;../whisper.cpp/download/x-ggml-model.zh.bin&#39;</div>
<div>
		whisper_model_load: loading model</div>
<div>
		whisper_model_load: n_vocab&nbsp; &nbsp; &nbsp; &nbsp;= 51865</div>
<div>
		whisper_model_load: n_audio_ctx&nbsp; &nbsp;= 1500</div>
<div>
		whisper_model_load: n_audio_state = 768</div>
<div>
		whisper_model_load: n_audio_head&nbsp; = 12</div>
<div>
		whisper_model_load: n_audio_layer = 12</div>
<div>
		whisper_model_load: n_text_ctx&nbsp; &nbsp; = 448</div>
<div>
		whisper_model_load: n_text_state&nbsp; = 768</div>
<div>
		whisper_model_load: n_text_head&nbsp; &nbsp;= 12</div>
<div>
		whisper_model_load: n_text_layer&nbsp; = 12</div>
<div>
		whisper_model_load: n_mels&nbsp; &nbsp; &nbsp; &nbsp; = 80</div>
<div>
		whisper_model_load: ftype&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div>
<div>
		whisper_model_load: qntvr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0</div>
<div>
		whisper_model_load: type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 3 (small)</div>
<div>
		whisper_model_load: adding 1608 extra tokens</div>
<div>
		whisper_model_load: n_langs&nbsp; &nbsp; &nbsp; &nbsp;= 99</div>
<div>
		whisper_model_load:&nbsp; &nbsp; &nbsp; CPU total size =&nbsp; &nbsp;487.01 MB</div>
<div>
		whisper_model_load: model size&nbsp; &nbsp; =&nbsp; 487.01 MB</div>
<div>
		whisper_init_state: kv self size&nbsp; =&nbsp; &nbsp;49.55 MB</div>
<div>
		whisper_init_state: kv cross size =&nbsp; &nbsp;55.30 MB</div>
<div>
		whisper_init_state: compute buffer (conv)&nbsp; &nbsp;=&nbsp; &nbsp;22.54 MB</div>
<div>
		&nbsp;whisper_init_state: compute buffer (encode) =&nbsp; 2&nbsp;80.20 MB</div>
<div>
		whisper_init_state: compute buffer (cross)&nbsp; =&nbsp; &nbsp; 6.31 MB</div>
<div>
		whisper_init_state: compute buffer (decode) =&nbsp; &nbsp;97.40 MB</div>
<div>
		&nbsp;</div>
<div>
		system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | METAL = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | CUDA = 0 | COREML = 0 | OPENVINO = 0</div>
<div>
		&nbsp;</div>
<div>
		main: processing &#39;/home/codelast/st.wav&#39; (23957094 samples, 1497.3 sec), 4 threads, 1 processors, 5 beams + best of 5, lang = zh, task = transcribe, timestamps = 1 ...</div>
<div>
		&nbsp;</div>
<div>
		&nbsp;</div>
<div>
		[00:00:00.000 --&gt; 00:00:19.040]&nbsp; 这里是识别文字第一句</div>
<div>
		[00:00:19.040 --&gt; 00:00:40.280]&nbsp; 这里是识别文字第二句<br />
		......</div>
</blockquote>
<div>
	<br />
	可以看到，输出的内容是带有时间轴标识的。<br />
	细看会发现，Whisper输出的中文有时会有错别字，我们可以用AI进一步纠错，想怎么处理你就可以随意发挥了。<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：<br />
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="color: rgb(77, 77, 77); font-size: 13px; width: 200px; height: 200px;" /><br />
	以及我的微信视频号：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
		<img decoding="async" alt="" src="https://www.codelast.com/wechat_shipinhao_qr_code.jpg" style="text-align: center; width: 200px; height: 199px;" /></p>
<div>
		&nbsp;</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e7%94%a8whisper-cpp%e5%9c%a8%e6%9c%ac%e5%9c%b0%e7%a6%bb%e7%ba%bf%e6%8a%8amp3%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%88%90%e4%b8%ad%e6%96%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] 和付费使用一年多的GitHub Copilot说再见</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e5%92%8c%e4%bb%98%e8%b4%b9%e4%bd%bf%e7%94%a8%e4%b8%80%e5%b9%b4%e5%a4%9a%e7%9a%84-github-copilot-%e8%af%b4%e5%86%8d%e8%a7%81/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e5%92%8c%e4%bb%98%e8%b4%b9%e4%bd%bf%e7%94%a8%e4%b8%80%e5%b9%b4%e5%a4%9a%e7%9a%84-github-copilot-%e8%af%b4%e5%86%8d%e8%a7%81/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Fri, 01 Mar 2024 19:16:53 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[综合]]></category>
		<category><![CDATA[AI辅助编程]]></category>
		<category><![CDATA[CodeGeeX]]></category>
		<category><![CDATA[GitHub Copilot]]></category>
		<guid isPermaLink="false">https://www.codelast.com/?p=14064</guid>

					<description><![CDATA[<div style="text-align: center;">
	<img decoding="async" alt="GitHub CoPilot" src="https://www.codelast.com/wp-content/uploads/2024/03/github_copilot_1.png" style="width: 800px; height: 213px;" /></div>
<div>
	&#160;</div>
<div>
	昨天，我的GitHub Copilot订阅到期了。付费使用了一年多，现在也决定不再续费，颇有些感受。<br />
	&#160;</div>
<div>
	从付费之前的热切期盼，到使用过程中的逐渐习惯，再到付费结束时的&#34;从容分手&#34;，我终究还是向现实投降，选择了穷人的活法。<br />
	&#160;</div>
<div>
	毕竟一个月10美元的费用，说它值或不值都可以找出充分的理由，只不过于我而言，GitHub Copilot已经不再有$10/月的吸引力罢了。<br />
	<span id="more-14064"></span></div>
<div style="text-align: center;">
	<img decoding="async" alt="GitHub CoPilot" src="https://www.codelast.com/wp-content/uploads/2024/03/github_copilot_2.png" style="width: 800px; height: 309px;" /></div>
<div>
<!--more--></div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	GitHub Copilot作为世界上第一款效果一流的AI辅助编程工具，是在2022年9月份正式上线的。之前，我和很多同行一样，时不时困在&#34;写代码&#8594;某些片段忘了怎么写&#8594;搜Google&#8594;复制粘贴网上的代码测试&#8594;继续写代码&#34;的循环中。这种熟悉而又重复的感觉长时间下来会给人积累不少负能量。<br />
	&#160;</div>
<div>
	直到GitHub Copilot出现，在科技媒体的渲染、宣传下，以及民间艺人的自测报告加持下，它被赋予了一个响当当的名字：牛B！<br />
	&#160;</div>
<div>
	于是我心动了。在试用了一个月，又继续付费体验了一个月之后，GitHub Copilot给我的震动让我相信：它一定能在开发过程中为我节省海量时间。于是在2023年初，我下定决心要续一年的费。<br />
	&#160;</div>
<div>
	$10/月的费用，对很多开发者来说可能要下很大决心才能下手。当时我账户上有一个优惠，以90多美元的价格续了一年的费，也就是不到700人民币一年。<br />
	&#160;</div>
<div>
	GitHub Copilot代码补全的准确度令人印象深刻。我觉得最爽的一点就是：它补全中文注释的结果令我十分满意。无论是补全class头部的比较长的注释，还是在写代码的过程中，补全一行的那种注释，我都觉得它能&#34;想我所想，写我想写&#34;。<br />
	&#160;</div>
<div>
	当然也有最不爽的一点，就是它连接服务器时不时会卡顿&#8212;&#8212;服务器在国外，可以理解。<br />
	&#160;</div>
<div style="text-align: center;">
	<img decoding="async" alt="alternatives" src="https://www.codelast.com/wp-content/uploads/2024/03/alternative.jpg" style="width: 750px; height: 320px;" /></div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	在2023年初那时，如果你想找到一个GitHub Copilot的免费版&#34;平替&#34;，那么选择并不多。国内的aiXcoder、CodeGeeX算是比较知名的其二。</div>
<div style="text-align: center;">
	<img decoding="async" alt="aiXcoder" src="https://www.codelast.com/wp-content/uploads/2024/03/aixcoder.jpg" style="width: 360px; height: 147px;" /></div>
<div>
	aiXcoder的最初几个版本我一直觉得它的设计是真的&#34;有病&#34;&#8212;&#8212;需要在本地安装一个后端软件来做inference。由于和系统相关，这显然会导致在很多Linux发行版上会用不了。比如我曾经在Ubuntu 16.04上尝试过安装aiXcoder的本地推理软件，无奈由于依赖库的问题装不上，到官方QQ群里反馈问题，官方的开发也只是确认了问题，却不给任何解决方案。想必这种没有任何KPI又赚不了一毛钱的事情，鬼才会给你开发！<br />
	&#160;</div>
<div>
	所以我毫不犹豫地抛弃了aiXcoder。</div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	GitHub Copilot那种&#34;一个插件解决所有问题&#34;、&#34;推理在云端完成&#34;的机制，就基本避开了系统版本的差异，没有了依赖库的问题。<br />
	&#160;</div>
<div style="text-align: center;">
	<img decoding="async" alt="CodeGeeX" src="https://www.codelast.com/wp-content/uploads/2024/03/codegeex.png" style="width: 727px; height: 153px;" /></div>
<div>
	<br />
	在2023年初，国产的CodeGeeX算是辅助编程领域的另一个耀眼明星。它和GitHub Copilot一样，inference都在云端完成，安装一个插件搞定一切&#8212;&#8212;这才像是一个正常的辅助编程软件应有的样子。<br />
	&#160;</div>
<div>
	我当时在大概10个case上详细对比过GitHub Copilot和CodeGeeX的效果，结论当然不出意外：GitHub Copilot全面碾压CodeGeeX&#8212;&#8212;这里不是指在某些技术指标上进行对比(比如用于评估代码生成质量的测试集等)，而是纯粹从个人的直观感受上看二者的输出谁更好。<br />
	&#160;</div>
<div>
	所以，实话实说，在2023年初的时候，经过我个人的测试，我宁可选择花700块这么大一笔费用去买GitHub Copilot，也不愿每天频繁使用免费的CodeGeeX，因为它当时的代码补全效果确实不太行，而且对某些编程语言的支持也很菜（比如Apache Pig），会影响我的开发工作。</div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e5%92%8c%e4%bb%98%e8%b4%b9%e4%bd%bf%e7%94%a8%e4%b8%80%e5%b9%b4%e5%a4%9a%e7%9a%84-github-copilot-%e8%af%b4%e5%86%8d%e8%a7%81/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<div style="text-align: center;">
	<img decoding="async" alt="GitHub CoPilot" src="https://www.codelast.com/wp-content/uploads/2024/03/github_copilot_1.png" style="width: 800px; height: 213px;" /></div>
<div>
	&nbsp;</div>
<div>
	昨天，我的GitHub Copilot订阅到期了。付费使用了一年多，现在也决定不再续费，颇有些感受。<br />
	&nbsp;</div>
<div>
	从付费之前的热切期盼，到使用过程中的逐渐习惯，再到付费结束时的&quot;从容分手&quot;，我终究还是向现实投降，选择了穷人的活法。<br />
	&nbsp;</div>
<div>
	毕竟一个月10美元的费用，说它值或不值都可以找出充分的理由，只不过于我而言，GitHub Copilot已经不再有$10/月的吸引力罢了。<br />
	<span id="more-14064"></span></div>
<div style="text-align: center;">
	<img decoding="async" alt="GitHub CoPilot" src="https://www.codelast.com/wp-content/uploads/2024/03/github_copilot_2.png" style="width: 800px; height: 309px;" /></div>
<div>
<!--more--></div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	GitHub Copilot作为世界上第一款效果一流的AI辅助编程工具，是在2022年9月份正式上线的。之前，我和很多同行一样，时不时困在&quot;写代码&rarr;某些片段忘了怎么写&rarr;搜Google&rarr;复制粘贴网上的代码测试&rarr;继续写代码&quot;的循环中。这种熟悉而又重复的感觉长时间下来会给人积累不少负能量。<br />
	&nbsp;</div>
<div>
	直到GitHub Copilot出现，在科技媒体的渲染、宣传下，以及民间艺人的自测报告加持下，它被赋予了一个响当当的名字：牛B！<br />
	&nbsp;</div>
<div>
	于是我心动了。在试用了一个月，又继续付费体验了一个月之后，GitHub Copilot给我的震动让我相信：它一定能在开发过程中为我节省海量时间。于是在2023年初，我下定决心要续一年的费。<br />
	&nbsp;</div>
<div>
	$10/月的费用，对很多开发者来说可能要下很大决心才能下手。当时我账户上有一个优惠，以90多美元的价格续了一年的费，也就是不到700人民币一年。<br />
	&nbsp;</div>
<div>
	GitHub Copilot代码补全的准确度令人印象深刻。我觉得最爽的一点就是：它补全中文注释的结果令我十分满意。无论是补全class头部的比较长的注释，还是在写代码的过程中，补全一行的那种注释，我都觉得它能&quot;想我所想，写我想写&quot;。<br />
	&nbsp;</div>
<div>
	当然也有最不爽的一点，就是它连接服务器时不时会卡顿&mdash;&mdash;服务器在国外，可以理解。<br />
	&nbsp;</div>
<div style="text-align: center;">
	<img decoding="async" alt="alternatives" src="https://www.codelast.com/wp-content/uploads/2024/03/alternative.jpg" style="width: 750px; height: 320px;" /></div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	在2023年初那时，如果你想找到一个GitHub Copilot的免费版&quot;平替&quot;，那么选择并不多。国内的aiXcoder、CodeGeeX算是比较知名的其二。</div>
<div style="text-align: center;">
	<img decoding="async" alt="aiXcoder" src="https://www.codelast.com/wp-content/uploads/2024/03/aixcoder.jpg" style="width: 360px; height: 147px;" /></div>
<div>
	aiXcoder的最初几个版本我一直觉得它的设计是真的&quot;有病&quot;&mdash;&mdash;需要在本地安装一个后端软件来做inference。由于和系统相关，这显然会导致在很多Linux发行版上会用不了。比如我曾经在Ubuntu 16.04上尝试过安装aiXcoder的本地推理软件，无奈由于依赖库的问题装不上，到官方QQ群里反馈问题，官方的开发也只是确认了问题，却不给任何解决方案。想必这种没有任何KPI又赚不了一毛钱的事情，鬼才会给你开发！<br />
	&nbsp;</div>
<div>
	所以我毫不犹豫地抛弃了aiXcoder。</div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	GitHub Copilot那种&quot;一个插件解决所有问题&quot;、&quot;推理在云端完成&quot;的机制，就基本避开了系统版本的差异，没有了依赖库的问题。<br />
	&nbsp;</div>
<div style="text-align: center;">
	<img decoding="async" alt="CodeGeeX" src="https://www.codelast.com/wp-content/uploads/2024/03/codegeex.png" style="width: 727px; height: 153px;" /></div>
<div>
	<br />
	在2023年初，国产的CodeGeeX算是辅助编程领域的另一个耀眼明星。它和GitHub Copilot一样，inference都在云端完成，安装一个插件搞定一切&mdash;&mdash;这才像是一个正常的辅助编程软件应有的样子。<br />
	&nbsp;</div>
<div>
	我当时在大概10个case上详细对比过GitHub Copilot和CodeGeeX的效果，结论当然不出意外：GitHub Copilot全面碾压CodeGeeX&mdash;&mdash;这里不是指在某些技术指标上进行对比(比如用于评估代码生成质量的测试集等)，而是纯粹从个人的直观感受上看二者的输出谁更好。<br />
	&nbsp;</div>
<div>
	所以，实话实说，在2023年初的时候，经过我个人的测试，我宁可选择花700块这么大一笔费用去买GitHub Copilot，也不愿每天频繁使用免费的CodeGeeX，因为它当时的代码补全效果确实不太行，而且对某些编程语言的支持也很菜（比如Apache Pig），会影响我的开发工作。</div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a></div>
<div>
	然而，在2023年一整年，CodeGeeX做了令人印象深刻的重大改进，不仅代码补全的质量提高很多，而且还增加了大量新功能，三言两语无法说完。因此，在2024年的今天，当我的GitHub Copilot需要再次付费的时候，除非它降价到原来的10%（我当然知道这不可能），否则我是不会再续费了，我会选择用免费的国产平替：CodeGeeX。<br />
	&nbsp;</div>
<div>
	2023年至今，除了CodeGeeX的巨大进步之外，市场上还出现了大量免费竞品，包括Codeium（国外），Fitten Code（国产）等等，它们虽然可能比GitHub Copilot还有差距，但是你要相信：只要你不是特别挑剔，日常使用绝对够了。</div>
<div>
	&nbsp;</div>
<div>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：<br />
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="color: rgb(77, 77, 77); font-size: 13px; width: 200px; height: 200px;" /><br />
	以及我的微信视频号：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
		<img decoding="async" alt="" src="https://www.codelast.com/wechat_shipinhao_qr_code.jpg" style="text-align: center; width: 200px; height: 199px;" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-%e5%92%8c%e4%bb%98%e8%b4%b9%e4%bd%bf%e7%94%a8%e4%b8%80%e5%b9%b4%e5%a4%9a%e7%9a%84-github-copilot-%e8%af%b4%e5%86%8d%e8%a7%81/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] 怎样确认当前正在运行的TensorFlow model-serving服务加载的是哪个.pb模型</title>
		<link>https://www.codelast.com/%e6%80%8e%e6%a0%b7%e7%a1%ae%e8%ae%a4%e5%bd%93%e5%89%8d%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c%e7%9a%84tensorflow-model-serving%e6%9c%8d%e5%8a%a1%e5%8a%a0%e8%bd%bd%e7%9a%84%e6%98%af%e5%93%aa%e4%b8%aa-pb/</link>
					<comments>https://www.codelast.com/%e6%80%8e%e6%a0%b7%e7%a1%ae%e8%ae%a4%e5%bd%93%e5%89%8d%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c%e7%9a%84tensorflow-model-serving%e6%9c%8d%e5%8a%a1%e5%8a%a0%e8%bd%bd%e7%9a%84%e6%98%af%e5%93%aa%e4%b8%aa-pb/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Wed, 24 May 2023 09:33:49 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[model-serving]]></category>
		<category><![CDATA[pb模型]]></category>
		<category><![CDATA[TensorFlow]]></category>
		<guid isPermaLink="false">https://www.codelast.com/?p=13912</guid>

					<description><![CDATA[<p>跑起来一个TensorFlow model-serving服务后，有时候记不清它加载的是哪个.pb模型了，可以采用下面的办法来确认。<br />
<span id="more-13912"></span><br />
访问URL：<br />
http://&#60;your_model_serving_host&#62;:18501/v1/models/&#60;your_model_name&#62;<br />
其中：<br />
&#60;your_model_serving_host&#62; 是你的model-serving服务器的域名或IP。<br />
&#60;your_model_name&#62; 是你的模型名称。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
会看到页面输出类似于下面的内容：</p>
<blockquote>
<div>
		{</div>
<div>
		&#160;&#34;model_version_status&#34;: [</div>
<div>
		&#160; {</div>
<div>
		&#160; &#160;&#34;version&#34;: &#34;1684833957&#34;,</div>
<div>
		&#160; &#160;&#34;state&#34;: &#34;AVAILABLE&#34;,</div>
<div>
		&#160; &#160;&#34;status&#34;: {</div>
<div>
		&#160; &#160; &#34;error_code&#34;: &#34;OK&#34;,</div>
<div>
		&#160; &#160; &#34;error_message&#34;: &#34;&#34;</div>
<div>
		&#160; &#160;}</div>
<div>
		&#160; }</div>
<div>
		&#160;]</div>
<div>
		}</div>
</blockquote>
<p>其中，version就是我们要找的东西。<br />
到你保存.pb模型的父目录下（可能是HDFS或本地磁盘），无脑搜version对应的关键字&#8230; <a href="https://www.codelast.com/%e6%80%8e%e6%a0%b7%e7%a1%ae%e8%ae%a4%e5%bd%93%e5%89%8d%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c%e7%9a%84tensorflow-model-serving%e6%9c%8d%e5%8a%a1%e5%8a%a0%e8%bd%bd%e7%9a%84%e6%98%af%e5%93%aa%e4%b8%aa-pb/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>跑起来一个TensorFlow model-serving服务后，有时候记不清它加载的是哪个.pb模型了，可以采用下面的办法来确认。<br />
<span id="more-13912"></span><br />
访问URL：<br />
http://&lt;your_model_serving_host&gt;:18501/v1/models/&lt;your_model_name&gt;<br />
其中：<br />
&lt;your_model_serving_host&gt; 是你的model-serving服务器的域名或IP。<br />
&lt;your_model_name&gt; 是你的模型名称。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
会看到页面输出类似于下面的内容：</p>
<blockquote>
<div>
		{</div>
<div>
		&nbsp;&quot;model_version_status&quot;: [</div>
<div>
		&nbsp; {</div>
<div>
		&nbsp; &nbsp;&quot;version&quot;: &quot;1684833957&quot;,</div>
<div>
		&nbsp; &nbsp;&quot;state&quot;: &quot;AVAILABLE&quot;,</div>
<div>
		&nbsp; &nbsp;&quot;status&quot;: {</div>
<div>
		&nbsp; &nbsp; &quot;error_code&quot;: &quot;OK&quot;,</div>
<div>
		&nbsp; &nbsp; &quot;error_message&quot;: &quot;&quot;</div>
<div>
		&nbsp; &nbsp;}</div>
<div>
		&nbsp; }</div>
<div>
		&nbsp;]</div>
<div>
		}</div>
</blockquote>
<p>其中，version就是我们要找的东西。<br />
到你保存.pb模型的父目录下（可能是HDFS或本地磁盘），无脑搜version对应的关键字 1684833957，找到哪个目录，就是我们要找的.pb模型所在的目录。<br />
通常这个目录下会有一个&nbsp;saved_model.pb 文件，以及一个&nbsp;variables 子目录。<br />
为什么可以这样做？因为version里的时间戳就是导出 .pb 模型的时间戳，这个时间戳精确到秒，一般情况下，两个模型几乎不太可能在同一秒生成，所以这个时间戳是唯一的，因此只要能找到这个目录名，那么目录里的 .pb 模型几乎肯定是我们要找的模型。</p>
<p>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：<br />
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="color: rgb(77, 77, 77); font-size: 13px; width: 200px; height: 200px;" /><br />
	以及我的微信视频号：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="" src="https://www.codelast.com/wechat_shipinhao_qr_code.jpg" style="text-align: center; width: 200px; height: 199px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e6%80%8e%e6%a0%b7%e7%a1%ae%e8%ae%a4%e5%bd%93%e5%89%8d%e6%ad%a3%e5%9c%a8%e8%bf%90%e8%a1%8c%e7%9a%84tensorflow-model-serving%e6%9c%8d%e5%8a%a1%e5%8a%a0%e8%bd%bd%e7%9a%84%e6%98%af%e5%93%aa%e4%b8%aa-pb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[AI] 怎样开发一个最简单的 iOS App</title>
		<link>https://www.codelast.com/ai-%e6%80%8e%e6%a0%b7%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aa%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84-ios-app/</link>
					<comments>https://www.codelast.com/ai-%e6%80%8e%e6%a0%b7%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aa%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84-ios-app/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Thu, 23 Mar 2023 18:19:39 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[iOS App]]></category>
		<category><![CDATA[开发]]></category>
		<guid isPermaLink="false">https://www.codelast.com/?p=13859</guid>

					<description><![CDATA[<p>要开发一个最简单的iOS应用程序，您需要了解一些基本的编程知识和工具。这是一些步骤：</p>
<p>1. 下载并安装Xcode：这是苹果公司提供的集成开发环境（IDE），可用于创建iOS应用程序。您可以从Mac App Store免费下载Xcode。&#160;</p>
<p>2. 学习Swift或Objective-C：这些是iOS应用程序开发中最常用的编程语言。每种语言都有其特定的语法和规则，需要花费一些时间来学习。&#160;<br />
<span id="more-13859"></span><br />
3. 创建新项目：打开Xcode，选择&#8220;File&#8221;&#62;&#8220;New&#8221;&#62;&#8220;Project&#8221;。然后选择&#8220;Single View Application&#8221;，输入您的项目名称和组织标识符，并选择其他选项，例如存储位置等。&#160;</p>
<p>4. 构建用户界面：使用Xcode提供的Interface Builder工具创建用户界面元素，例如按钮、文本字段、标签等。&#160;</p>
<p>5. 实现功能逻辑：在ViewController.swift或ViewController.m文件中实现应用程序逻辑。例如，在按钮点击时执行某个操作等。&#160;</p>
<p>6. 运行应用程序：使用模拟器或连接到实际设备运行应用程序，并测试其功能。&#160;</p>
<p>以上是一个大致的步骤来创建一个最简单的iOS应用程序。当然还有非常多的细节需要了解和掌握，但这可以作为您开始学习iOS开发的起点。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&#160;关注不迷路&#160;<span style="color: rgb(255, 0, 0);">➤➤</span>&#160;</p>
<p>
	感谢关注我的微信公众号（微信扫一扫）：<br />
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="color: rgb(77, 77, 77); font-size: 13px; width: 200px; height: 200px;" /><br />
	以及我的微信视频号：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="" src="https://www.codelast.com/wechat_shipinhao_qr_code.jpg" style="text-align: center; width: 200px; height: 199px;" />&#8230; <a href="https://www.codelast.com/ai-%e6%80%8e%e6%a0%b7%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aa%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84-ios-app/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>要开发一个最简单的iOS应用程序，您需要了解一些基本的编程知识和工具。这是一些步骤：</p>
<p>1. 下载并安装Xcode：这是苹果公司提供的集成开发环境（IDE），可用于创建iOS应用程序。您可以从Mac App Store免费下载Xcode。&nbsp;</p>
<p>2. 学习Swift或Objective-C：这些是iOS应用程序开发中最常用的编程语言。每种语言都有其特定的语法和规则，需要花费一些时间来学习。&nbsp;<br />
<span id="more-13859"></span><br />
3. 创建新项目：打开Xcode，选择&ldquo;File&rdquo;&gt;&ldquo;New&rdquo;&gt;&ldquo;Project&rdquo;。然后选择&ldquo;Single View Application&rdquo;，输入您的项目名称和组织标识符，并选择其他选项，例如存储位置等。&nbsp;</p>
<p>4. 构建用户界面：使用Xcode提供的Interface Builder工具创建用户界面元素，例如按钮、文本字段、标签等。&nbsp;</p>
<p>5. 实现功能逻辑：在ViewController.swift或ViewController.m文件中实现应用程序逻辑。例如，在按钮点击时执行某个操作等。&nbsp;</p>
<p>6. 运行应用程序：使用模拟器或连接到实际设备运行应用程序，并测试其功能。&nbsp;</p>
<p>以上是一个大致的步骤来创建一个最简单的iOS应用程序。当然还有非常多的细节需要了解和掌握，但这可以作为您开始学习iOS开发的起点。<br />
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;关注不迷路&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;</p>
<p>
	感谢关注我的微信公众号（微信扫一扫）：<br />
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="color: rgb(77, 77, 77); font-size: 13px; width: 200px; height: 200px;" /><br />
	以及我的微信视频号：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="" src="https://www.codelast.com/wechat_shipinhao_qr_code.jpg" style="text-align: center; width: 200px; height: 199px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/ai-%e6%80%8e%e6%a0%b7%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aa%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84-ios-app/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
