whisper model メモ

 

2024-09-30 Whisper音声認識モデルによって制度は違うが時間もすごい違う。メモ。

 

docker run –rm -v /path/to/dir:/whisper whisper whisper “test.mp4” –language Japanese –model large

10分くらいして落ちた。時間かかりすぎる。

largeは厳しいなぁ。今の環境ではGPUを使うこともできないようだし。

Nvediaじゃないしな。CUPでやるしかない。とりあえず。

tiny

[00:00.000 –> 00:05.400] えーとまぁではその強い強い強いにしてもいいんじゃないのえーと
[00:05.400 –> 00:14.000] よぶつり的なまあ一緒にぶつり的にどれよこれとかぶつり的な力が必要だという場合は
[00:14.000 –> 00:17.200] まあ優しくと関係ないかもしれないけど強い強い強い強い

微妙な精度だ。

base

[00:00.000 –> 00:24.000] その強い水流にしてもいいんじゃないの、物理的な物理的な力が必要だって言う場合は優しく関係ないかもしれないけど、強い水流にしてもいいんじゃないかと、強水流ってあっ
たもんね、ドラムはないんだけどね。

普通にいい精度だ。しかもスピードTinyより速かったかも?

small

ガクッと遅くなったなぁ。精度によるところだが。

[00:00.000 –> 00:08.160] えっとまあではその強い水流にしてもいいんじゃないの えっと要は物理的な
[00:08.160 –> 00:19.680] まあ非常に物理的どれよこれとか物理的な力が必要だという場合は 優しくとか関係ないかもしれないけど強い水流にしてもいいんじゃないかと
[00:19.680 –> 00:24.840] まあ強水流ってあったもんねドラムはないんだけどね

medium

ものすごく遅いなぁ。やめようかなって位。

[00:00.000 –> 00:19.000] 強い水流にしてもいいのではないかと考えました。
[00:19.000 –> 00:23.000] 強水流ってあったもんね。ドラムはないんだけどね。

 

なんか全然ないよう違うってことが分かったぞ。

なんか内容をまとめちまうこともあるのか?ってくらい。

 

 

 

airdrop エアドロ USDX.money

created by Rinker
一応私の紹介リンクですが、あまり勧めにくいかも。 1:1のペッグは大丈夫なのか?

 

2024-12-09 試しに少し触ってみるけど、少額だけ。

takaさんからの情報。

 


担保的にはほとんどBinanceになっているみたい。

 

APY 37%ってなっているけど、大丈夫かこれ。

正直私も全然わかってないのだけど、USDeみたいな仕組みということ。

USDe自体は何だろう?ってことでリンク保存。

USDXの説明URL保存

用は現物の売らずけなさそうなんだけど、システム的に安定化させようとしているのかな?理解があっているか分からないけど。

 

今見たら50%超えてる。

なるほど。レシートトークンの価値が上がっていく予定なのかな。

WithDraw All ってのはちょっとね。

Allじゃないし。

いろいろミドルリスクってなっているみたい。

微妙な信頼な感じ。

Metamask側でMax金額を指定すればいいのかもしれないけど。

まあここまで、やったところで、ちょっと考える。やばさを。

まだ買ってないし、買わないかもしれない。

 

 

x(twitter) API test Like 取得

2025-04-10 コマンドメモ

https://twitter.com/i/oauth2/authorize?response_type=code&client_id={Client ID}&redirect_uri=http://localhost:3000&scope=tweet.read%20users.read%20like.read&state=state123&code_challenge=challenge&code_challenge_method=plain

ってこれ手作業でアクセストークン取れなかった。

 

from http.server import BaseHTTPRequestHandler, HTTPServer
import webbrowser
import requests
from urllib.parse import urlparse, parse_qs
import base64

# — 設定 —
CLIENT_ID = “YOUR_CLIENT_ID”
CLIENT_SECRET = “YOUR_CLIENT_SECRET” # ★注意: 本番環境では直接書かない
REDIRECT_URI = “http://localhost:3000”
SCOPE = “tweet.read users.read like.read”
CODE_VERIFIER = “challenge” # plain の場合
# ————

# Basic認証ヘッダー生成
auth_header = base64.b64encode(f”{CLIENT_ID}:{CLIENT_SECRET}”.encode()).decode()

authorization_url = (
f”https://twitter.com/i/oauth2/authorize?”
f”response_type=code&client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}”
f”&scope={SCOPE.replace(‘ ‘, ‘%20’)}&state=state123″
f”&code_challenge={CODE_VERIFIER}&code_challenge_method=plain”
)

print(“以下のURLにアクセスして認証してください:”)
print(authorization_url)
webbrowser.open(authorization_url)

# — ここから簡易サーバー —
class OAuthCallbackHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header(“Content-type”, “text/html”)
self.end_headers()
self.wfile.write(b”<html><body><h1>Authorization Callback Received</h1>”)

query_components = parse_qs(urlparse(self.path).query)
if “code” in query_components:
auth_code = query_components[“code”][0]
print(f”\nReceived authorization code: {auth_code}”)
self.wfile.write(f”<p>Code: {auth_code}</p>”.encode())
self.wfile.write(b”<p>Attempting to get access token…</p>”)

# — アクセストークン取得リクエスト —
token_url = “https://api.twitter.com/2/oauth2/token”
payload = {
“code”: auth_code,
“grant_type”: “authorization_code”,
“client_id”: CLIENT_ID, # PKCE(plain)でもClient IDが必要な場合がある
“redirect_uri”: REDIRECT_URI,
“code_verifier”: CODE_VERIFIER,
}
headers = {
“Content-Type”: “application/x-www-form-urlencoded”,
“Authorization”: f”Basic {auth_header}”
}

try:
response = requests.post(token_url, data=payload, headers=headers, timeout=10)
response.raise_for_status() # エラーがあれば例外発生
token_data = response.json()
print(“\nAccess Token successfully retrieved:”)
print(token_data)
self.wfile.write(f”<pre>{response.text}</pre>”.encode())
# ★★★★★
# ここで取得した access_token を使う
# 例: print(f”Access Token: {token_data[‘access_token’]}”)
# ★★★★★

except requests.exceptions.RequestException as e:
print(f”\nError getting access token: {e}”)
if e.response is not None:
print(f”Response body: {e.response.text}”)
self.wfile.write(f”<p>Error: {e.response.status_code}</p><pre>{e.response.text}</pre>”.encode())
else:
self.wfile.write(f”<p>Error: {e}</p>”.encode())

self.wfile.write(b”<p>You can close this window.</p></body></html>”)

# サーバーを停止させるためのフラグなど(簡易的な例)
global server
server.server_close() # すぐ閉じる
print(“\nServer stopped.”)

else:
self.wfile.write(b”<p>No authorization code found.</p></body></html>”)

if __name__ == “__main__”:
port = 3000
server_address = (‘localhost’, port)
server = HTTPServer(server_address, OAuthCallbackHandler)
print(f”Starting simple HTTP server on http://localhost:{port}”)
try:
server.serve_forever()
except KeyboardInterrupt:
pass
server.server_close()
print(“Server stopped.”)

 




import requests

# users.readスコープを持つアクセストークン
access_token = "YOUR_ACCESS_TOKEN"
headers = {"Authorization": f"Bearer {access_token}"}
url = "https://api.twitter.com/2/users/me"
response = requests.get(url, headers=headers)
if response.status_code == 200:
    user_data = response.json()
    print("あなたの数値ID:", user_data['data']['id'])
else:
    print("Error:", response.status_code, response.text)


import requests
access_token = "取得したトークン"
headers = {"Authorization": f"Bearer {access_token}"}
user_id = "あなたのユーザーID"
url = f"https://api.twitter.com/2/users/{user_id}/liked_tweets"
response = requests.get(url, headers=headers)
print(response.json())