Skip to content

Instantly share code, notes, and snippets.

View america's full-sized avatar

Takashi Haga america

  • Japan
  • 15:26 (UTC +09:00)
View GitHub Profile
@america
america / youtube_transcribe.py
Created January 1, 2025 05:24
「YouTube動画から音声を抽出し、Whisperを使って文字起こしを行うPythonスクリプト 必要なもの: yt-dlp openai-whisper ffmpeg」
import whisper
import subprocess
import os
def download_audio(url, output_file="audio.mp3"):
# YouTubeから音声をダウンロード
command = [
"yt-dlp",
"-x", # 音声のみを抽出
"--audio-format", "mp3", # mp3形式で保存
sudo pacman -S linux-lts linux-lts-headers
#include <stdio.h>
#define BUFSIZE 1024 + 1
int read_file(char *fname)
{
FILE *fp;
char buf[BUFSIZE];
fp = fopen(fname, "r");
@america
america / Makefile
Last active March 22, 2017 04:13
simple makefile for C
TARGET = test
CC = gcc
CFLAGS = -c -v
VPATH = src
SRC = test.c
OBJ = $(SRC:.c=.o)