现在视频成了传递信息的重要媒介,但是并不是所有的信息都适合使用视频这个媒介。厨师王刚的介绍做菜使用视频当然没有问题,财经类的信息使用视频实在是降低了信息获取速度。本文介绍如何获取视频的文字稿。内容直接启发自 https://twitter.com/shell909090/status/1351371503019847681 由于原推主锁推,引用如下。
最近在看很多财经频道,里面一个人说说说讲了半天,其实干货可能就十句话。问题是怎么从几十分钟的内容里看到这10句干货呢?我找了一个简单办法。先用youtube-dl -f ‘bestaudio[ext=m4a]’下载音频。然后用下面这个项目转换为字幕。最后直接看字幕,三分钟完事。https://github.com/agermanidis/autosub
下载 Youtube 视频的音频内容
youtube-dl -f 'bestaudio[ext=m4a]' "URL"
使用 autosub 获取字幕,autosub 的原始仓库现在已经不维护,我使用的是目前活跃维护的 fork 版本,简介有简体中文。
Ubuntu 下的安装
pip install git+https://github.com/BingLingGroup/autosub.git@alpha ffmpeg-normalize langcodes
使用
autosub -s zh-CN -i audio.m4a
简单尝试发现使用的效果一般。不过总比看十几分钟的视频快多了。转文字利用的是 Google Cloud Speech 的 API,需要将音频文件分段转为文字,所以速度不算快。不过敲好命令可以看别的去。总体来说还是节约了大量时间的。
如果懒得自己折腾的,可以考虑提供类似功能的商业服务 (未尝试): Get The tldr Of Any YouTube Video In Seconds https://you-tldr.com/
个人数字生活一览。距离上次发布类似的文章已经 3 年了,这三年变化当然很大。受 Julian Shapiro 启发,以后每季度对个人工具库进行更新。
主要使用 IFTTT 和 Pinboard 进行管理,所有的信息存档在 Pinboard,因为购买了 Archive 账户,全文搜索也是可能。
命名是计算科学中最难的两件事,Beancount 的账户的命名尤其困难。对于从其他记账工具迁移过来的用户,直接将原先的账户结构迁移过来当然是可以的。但是 Beancount 这种文本记账工具,对于账户的处理几乎没有成本,可以任性地添加更多的账户。直接复制原来工具的账户结构可能无法完全发挥 Beancount 的能力。
我个人为 Beancount 的账户命名有提供以下几点指导:
最后附上一些其他记账工具默认的账户命名,可供参考。
MoneyWiz 默认账户名
Automobile
Accessories
Car Insurance
Gas/Fuel
Lease
Maintenance
Other
Parking
Bills
Cable
Electricity
Gas
Internet/Broadband
Mobile Phone
Other
Phone
Water
Clothing
Accessories
Clothes
Jewelry
Other
Shoes
Digital
Apps
Books
Movies
Music
Other
Podcasts
TV Shows
Food & Dining
Dining/Eating Out
Groceries
Other
Health Care
Dental
Eye Care
Health Insurance
Medical
Other
Pharmacy
Housing
Furniture/Accessories
Home Insurance
Maintenance
Mortgage
Other
Rent
Leisure
Entertainment
Fitness/Sport
Other
Personal Care
Loans
Other
Taxes
Transportation
Travel
mint-categories https://www.mint.com/mint-categories
Expenses (all types)
1. Rent/Mortgage
a. Home Owners Association Dues
b. Rental Insurance
c. Home Owners Insurance
2. Fixed Expenses
a. Utilities
b. Gas
c. Electric
d. Water/Trash/Sewer
e. Cable/Internet/Phone
f. Cell Phone
g. Credit Cards
h. Car Expenses
i. Maintenance
j. Gas
3. Extra Expenses
a. Grocery (Food)
b. Clothes/Shoes/Hygiene
c. Extra for Home Expenses
4. Savings
a. Savings Account. Speak with employer; some saving plans can pull from paycheck before taxes. That means less of your paycheck is taxable.
b. Create an Emergency Fund; it should be at least 6 months of expenses. Emergencies can happen and drain a well-established savings account
5. Taxes
a. No explanation needed
6. Fun Cash
a. Out with friends
b. Movies
c. Vacations
GnuCash
Adjustment
Auto
Fees
Gas
Parking
Repair and Maintenance
Bank Service Charge
Books
Cable
Charity
Clothes
Computer
Dining
Education
Entertainment
Music/Movies
Recreation
Travel
Gifts
Groceries
Hobbies
Insurance
Auto Insurance
Health Insurance
Life Insurance
Laundry/Dry Cleaning
Medical Expenses
Miscellaneous
Online Services
Phone
Public Transportation
Subscriptions
Supplies
Taxes
Federal
Medicare
Other Tax
Social Security
State/Province
Utilities
Electric
Garbage collection
Gas
Water
beancount-boilerplate-cn 这个项目中的账户命名也可以参考。