Skip to content

Instantly share code, notes, and snippets.

@desimmons
Created July 27, 2023 19:03
Show Gist options
  • Save desimmons/e2c306787e311105312e387a864a6924 to your computer and use it in GitHub Desktop.
Save desimmons/e2c306787e311105312e387a864a6924 to your computer and use it in GitHub Desktop.
# Create a payment claim to fund the request
PAYMENT_CLAIM=\
'{"account": "rGazdzwqUy5hVHpwdNpVVpex2MvwujhcP4", "destination_account": "rstbSTpPcyxMsiXwkBxS9tFTrg2JsDNxWk", "authorized_to_claim": "100000000", "signature": "739A0FD22815E118ED325764781BF46665BB7E5325EBC557495A3F8AE5194B6C6B17F2EF7B66F3ADF7469E5658AF7F76B56D59CA98A5CBE51429F9B5574FD10D", "channel_id": "76922D6C3C5C16F61628D8193A870C2D9409596CEDA03C85AA49F0B361DDE4C0"}'
# /run end-point for https://dhali-app.web.app/#/assets/d82952124-c156-4b16-963c-9bc8b2509b2c
URL=\
'https://dhali-prod-run-dauenf0n.uc.gateway.dev/d82952124-c156-4b16-963c-9bc8b2509b2c/run'
WAV_FILE=\
'/tmp/tmp.wav'
# An example speech .wav file
wget https://www.signalogic.com/melp/EngSamples/eng_m9.wav -O $WAV_FILE
# Make request to Dhali asset
curl -X PUT \
-H "Payment-Claim: $PAYMENT_CLAIM" \
-F "input=@$WAV_FILE" \
$URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment