Skip to content

Instantly share code, notes, and snippets.

View chck's full-sized avatar
🏠
Working from home

chck chck

🏠
Working from home
View GitHub Profile
# Calcurate km/h from distance (km) and duration (mm:ss) to manage your workout.
#
# Usage:
# python phour.py 2.62 20:28
# >> 7.68 km/h
#
from sys import argv
distance = argv[1] # 2.62 km
duration = argv[2] # 20.28 m
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mkdir -p voices
curl -X POST https://texttospeech.googleapis.com/v1/text:synthesize \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @- << EOF | jq ".audioContent" | sed -e 's/^"//' -e 's/"$//' > /tmp/synthesize-output-base64.txt
{
"input":{
"text":"以上になります、ご清聴ありがとうございました。何でもお気軽にご質問ください"
},
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.