AI知识库 @ai521
312 subscribers
21.7K photos
42 videos
19 files
833 links
@ai521 专注分享最实用的AI内容

🤖 AI教程(新手到进阶)
🧠 AI知识科普(大模型 / 提示词 / 自动化)
📰 AI资讯更新(每日最新AI动态)
📚 AI实战技巧(写作 / 绘画 / 编程 / 赚钱)
🔧 最新AI工具推荐

每天更新AI干货
长期做一个真正有价值的AI频道
Download Telegram
or {} if not data: return jsonify({"error": "invalid request body"}), 400 title = ("title", "Untitled") text = ("text", "") voice = ("voice", DEFAULT_VOICE) if not text: return jsonify({"error": "Provide 'text' to narrate"}), 400 book_id = f"book-{uuid.uuid4().hex[:8]}" # Step 1: AI chunks text into chapters with narration cues try: chunking_result = inference([ {"role": "system", "content": "You are an audiobook production assistant..."}, {"role": "user", "content": text[:15000]} except : # Fallback: split by paragraphs paragraphs = [ () for p in ("\n\n") if ()] chapters = [{ "chapter_title": f"Chapter {i + 1}", "tone": "warm", "pacing": "moderate" } for i, chunk in enumerate(paragraphs)] # Step 2 + 3: TTS per chapter → Cloud Storage for chapter in chapters: audio = tts_generate(chapter["narration_text"], voice=voice) key = f"{book_id}/chapter-{chapter['chapter_number']:02d}.mp3" url = upload_to_storage(BUCKET_NAME, key, audio) books[book_id]["storage_urls"].append(url) return jsonify({ "book_id": book_id, "title": title, "status": "complete", "chapters": len(books[book_id]["chapters"]), "storage_urls": books[book_id]["storage_urls"] }), 201 Run It git clone cd telnyx-code-examples/ai-audiobook-narrator-python cp . .env # add TELNYX_API_KEY, optionally tune AI_MODEL, TTS_MODEL, BUCKET_NAME pip install -r python The server starts on . Create a bucket named audiobooks in the Telnyx Portal (or set BUCKET_NAME to an existing bucket) and submit a chunk of text: curl -X POST \ -H "Content-Type: application/json" \ -d '{ "title": "The Future of Infrastructure", "text": "Chapter 1: The shift from cloud-edge to carrier-edge compute is changing where latency-sensitive workloads run...", "voice": "nova" }' The response includes a book_id and a list of presigned storage_urls , one per chapter: { "title": "The Future of Infrastructure", "status": "complete", "chapters": 3, "voice": "nova", " " " ] } Open any storage_url in a browser or stream it from a client to hear the narrated chapter. The app exposes five narrator voices out of the box: List them at any time: curl Pass any voice identifier in the voice field of the /books/narrate request. This example uses an in-memory dict for book metadata, which is fine for local testing but loses state on restart. For production: Do I need an existing Cloud Storage bucket before running this? Yes. Create a bucket in the Telnyx Portal and set BUCKET_NAME in .env to match. The app does not create the bucket for you. What happens if the AI returns malformed JSON for the chapter split? The app catches and falls back to splitting the text by double-newline paragraphs. Each paragraph becomes a chapter with default tone: warm and pacing: moderate . Narration still completes — you just lose the AI's tone and pacing direction. Which AI model is used by default? The default is moonshotai/Kimi-K2.6 (set in . and overridable via AI_MODEL ). Any model available on Telnyx AI Inference works — see the models list for options. Can I use a different TTS voice per chapter? Not in this example — the voice is set once per request and used for every chapter. To vary voices per chapter, extend the narrate_book loop to read chapter["voice"] from the AI's response and pass it to tts_generate . How long do the presigned URLs last? One hour ( ExpiresIn=3600 ). The stored MP3s persist in the bucket; only the URL expires. Generate a fresh presigned URL with s3.generate_presigned_url whenever you need a new one. Is the
uploaded audio public? No. The bucket is private by default. Only the presigned URL grants time-limited read access. To make audio publicly accessible (e.g., for public-domain audiobooks), set a public read policy on the bucket in the Telnyx Portal. What is the maximum input text length? The chunking step truncates input to 15,000 characters per request. For longer manuscripts, split the source into sections on the client and submit each as a separate /books/narrate request, then stitch the resulting storage_urls together. Can I narrate in languages other than English? Yes — Telnyx TTS supports multiple languages. The AI Inference prompt is in English, but you can edit the system message in to chunk in another language, and pass a language-appropriate voice to tts_generate .
AI数据中心隐含水耗达官方数据数十倍 韩国巨型项目风险高

据《华尔街日报》报道,美国劳伦斯伯克利国家实验室最新报告指出,AI数据中心的“间接水耗”(发电过程中蒸发的水)平均是服务器直接冷却用水的12倍,但多数科技巨头仅披露直接用水。谷歌2023年直接用水虽达109亿加仑,但研究估算其隐含水耗至少为直接用水的3倍;Meta 2024年间接水耗超过直接用水20倍,达190亿加仑,却未制定具体减排措施。此外,约三分之二的新建数据中心位于菲尼克斯等长期缺水地区,非营利组织警告当地水需求到2031年将超城市总水量的20%。Nvidia虽研发无水冷却系统,但全球数据中心改造代价高昂。韩国正推进的“三大巨型项目”大规模兴建AI数据中心,因缺乏水资源对策被业界认为存在严重隐患。 #AI #数据中心 #水资源 #环境 #韩国 #科技新闻 #隐含水耗
AI内容与社会契约

一位个人博客作者在其网站发文,批评当前用AI生成内容或摘要阅读的潮流。他指出,利用AI快速写博文或让AI消化文章虽能带来虚假的“高产感”,但本质上如“信息垃圾食品”,无法满足真正的交流与求知。作者强调,他写博客是为了分享对宇宙的惊叹、传递知识,而非追求数量;读者阅读也应追求充实感而非效率。他担忧AI介入创作与消费会廉价化人与人之间的真实连接,并认为互联网的未来应回归由人类策展的小众社区,而非AI主导的流水线内容生产。文章引发对技术时代内容价值与社会契约的反思。 #AI #内容创作 #博客 #社会契约 #伪生产力 #信息消费 #互联网趋势 #技术伦理
AI智能体系统缺乏可见性?开发者用LangSmith实现全流程追踪

开发者Hugo Santana为其构建的多智能体系统引入了可观测性平台LangSmith。此前,他搭建了一个由6个智能体组成的研究系统,用于追踪AI应用案例、工具和供应商,并包含翻译和内容匹配等功能。随着系统扩展至更多智能体,虽然能看到最终输出和日志,但无法清晰了解每个智能体的运行细节,如token消耗、任务失败原因和耗时。LangSmith提供了完整的追踪功能,将智能体活动转化为可搜索的运行记录,包含输入输出、时长、状态、成本及错误信息。这一集成使他能够监控效率、可靠性,并为多智能体产品的优化奠定基础。LangSmith框架无关的特性使其能无缝对接自定义系统,且开源的API设计便于AI编码工具辅助集成。 #AI #智能体 #可观测性 #LangSmith #多智能体系统 #技术工具
iRobot发布首款非机器人地板清洁器Roomba Electro Plus

美国扫地机器人品牌iRobot近日发布其首款非机器人地板清洁产品——Roomba Electro Plus。该设备售价399美元,是一款五合一硬地板清洁器,结合吸尘、拖地和消毒功能,但需要用户手动操作。与此同时,iRobot还推出了五款新型Roomba机器人吸尘器,吸力更强、体积更小且价格更低,主要取代2025年上市的旧款系列。此举标志着iRobot从纯自动清洁向手动清洁设备的产品线拓展。 #iRobot #Roomba #ElectroPlus #非机器人 #手动清洁 #扫地机器人 #新品发布 #科技
微软修复Windows 11文件夹异常占用大量存储空间的Bug

微软近日修复了Windows 11中存在的一个Bug,该Bug导致系统中的一个文件夹占用了数GB的存储空间。据科技媒体Windows Latest报道,微软已在2026年6月的可选更新KB5095093中集成了相关补丁,补丁说明中提到“改进了 -wal 文件的磁盘空间使用”。此次更新旨在解决文件夹异常占用问题,帮助用户释放被无端占用的硬盘空间。目前该补丁为可选性质,用户可自行决定是否安装。 #Windows11 #微软 #系统更新 #Bug修复 #存储空间 #技术新闻 #Windows #性能 #更新