Skip to content

Instantly share code, notes, and snippets.

View zironycho's full-sized avatar
๐ŸŽจ
I may be slow to respond.

Juncheol Cho zironycho

๐ŸŽจ
I may be slow to respond.
View GitHub Profile
@zironycho
zironycho / typecast.py
Last active December 29, 2023 06:53
Typecast api (python)
import requests
import time
API_TOKEN = {{your token here}}
HEADERS = {'Authorization': f'Bearer {API_TOKEN}'}
# get my actor
r = requests.get('https://typecast.ai/api/actor', headers=HEADERS)
my_actors = r.json()['result']
@zironycho
zironycho / news.txt
Last active November 22, 2023 05:39
Typecast api with textfile (such as news)
11์›” 7์ผ ์˜คํ›„ (ํ•˜์ง€๋งŒ ์˜ค์ „์ผ ์ˆ˜๋„ ์žˆ๋Š”?) ๋‰ด์Šค์ž…๋‹ˆ๋‹ค.
<break time="1000ms" />
<unknown time="1000ms" />
์ž…๋™์„ ํ•˜๋ฃจ ์•ž๋‘๊ณ  ์ „๊ตญ ๋Œ€๋ถ€๋ถ„ ์ง€์—ญ์˜ ๊ธฐ์˜จ์ด ์–ด์ œ๋ณด๋‹ค 10๋„ ๋„˜๊ฒŒ ๋–จ์–ด์กŒ์Šต๋‹ˆ๋‹ค.
๋‚ด์ผ์€ ์˜ค๋Š˜๋ณด๋‹ค ๋” ์Œ€์Œ€ํ•˜๊ฒ ๊ณ  ๋ชจ๋ ˆ ๊ธฐ์˜จ์ด ์กฐ๊ธˆ ์˜ค๋ฅด์ง€๋งŒ, ์ฃผ๋ง๋ถ€ํ„ฐ ๋‹ค์‹œ ์ถ”์›Œ์งˆ ์ „๋ง์ž…๋‹ˆ๋‹ค.
<break time="1000ms" />
๋ณ‘์›์—์„œ ์น˜๋ฃŒ๋ฅผ ๋ฐ›๋‹ค๊ฐ€ ๋„๋ง์นœ ํŠน์ˆ˜๊ฐ•๋„ ํ”ผ์˜์ž ๊น€๊ธธ์ˆ˜๊ฐ€ ๋„์ฃผ 70์—ฌ ์‹œ๊ฐ„ ๋งŒ์— ์–ด์ ฏ๋ฐค ๊ฒฝ๊ธฐ๋„ ์˜์ •๋ถ€์—์„œ ๋ถ™์žกํ˜”์Šต๋‹ˆ๋‹ค.
๊น€๊ธธ์ˆ˜๋Š” ์ฒดํฌ ์งํ›„ "๋„์ฃผ๊ณ„ํš์ด๋‚˜ ์กฐ๋ ฅ์ž๊ฐ€ ์—†์—ˆ๋‹ค"๊ณ  ์ฃผ์žฅํ–ˆ์Šต๋‹ˆ๋‹ค.
<break time="1000ms" />
์ „ ํŽœ์‹ฑ ๊ตญ๊ฐ€๋Œ€ํ‘œ ๋‚จํ˜„ํฌ ์”จ๊ฐ€ ๊ฒฐํ˜ผ ์ƒ๋Œ€์˜€๋˜ ์ „์ •์กฐ ์”จ์˜ ์‚ฌ๊ธฐ ํ˜์˜ ๊ณต๋ฒ”์œผ๋กœ ์ž…๊ฑด๋ผ 10์‹œ๊ฐ„ ๊ฐ€๊นŒ์ด ์กฐ์‚ฌ๋ฅผ ๋ฐ›๊ณ  ๊ท€๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
@zironycho
zironycho / make-signature.py
Last active November 15, 2023 02:15
make signature for api
import sys
import base64
import hmac
from hashlib import sha1
from datetime import datetime, timezone
# https://docs.aws.amazon.com/ko_kr/AmazonS3/latest/userguide/RESTAuthentication.html
def make_signature(timestamp, company, endpoint, method, secret_key):
string_to_signin = '\n'.join([
@zironycho
zironycho / typecast-quick-cloning.py
Created October 25, 2024 04:22
Typecast api with quick cloning (python)
import os
import time
import requests
API_TOKEN = {{your API token}}
REFERENCE_AUDIO_FILENAME = {{your audio filename}}
HEADERS = {'Authorization': f'Bearer {API_TOKEN}'}
import requests
API_TOKEN = {{your token here}}
HEADERS = {'Authorization': f'Bearer {API_TOKEN}'}
# get my actor
r = requests.get('https://typecast.ai/api/actor', headers=HEADERS)
my_actors = r.json()['result']
my_first_actor = my_actors[0]
my_first_actor_id = my_first_actor['actor_id']