{"id":42116341,"url":"https://github.com/susom/ourvoice_ffmpeg_api","last_synced_at":"2026-01-26T14:09:20.533Z","repository":{"id":40319686,"uuid":"379084634","full_name":"susom/ourvoice_ffmpeg_api","owner":"susom","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-29T16:45:30.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-29T19:28:27.575Z","etag":null,"topics":["cloudops","ourvoice"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/susom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-21T23:06:42.000Z","updated_at":"2025-07-29T16:45:35.000Z","dependencies_parsed_at":"2025-07-29T18:27:50.510Z","dependency_job_id":"51567b43-2a1f-4fa5-9930-0135f2c439ef","html_url":"https://github.com/susom/ourvoice_ffmpeg_api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/susom/ourvoice_ffmpeg_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fourvoice_ffmpeg_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fourvoice_ffmpeg_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fourvoice_ffmpeg_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fourvoice_ffmpeg_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/susom","download_url":"https://codeload.github.com/susom/ourvoice_ffmpeg_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fourvoice_ffmpeg_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28780246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudops","ourvoice"],"created_at":"2026-01-26T14:09:20.481Z","updated_at":"2026-01-26T14:09:20.528Z","avatar_url":"https://github.com/susom.png","language":"JavaScript","readme":"# Ourvoice ffmpeg API\n\n### Api intended for mp3 conversion from .wav and .amr filetypes\n### This repository contains the definitions of two cloud functions\n\n## generateUploadUrl\n\n- Function that will generate a signed URL upon use.\nThe returned function can then be invoked to store files in their corresponding location in the ourvoice storage bucket.\n\nExample POST parameters:\n```\nHeaders: {\n    application/x-www-form-urlencoded\n}\n```\n```\nBody: {\n    fileName:apple.wav\n    walkHash:6C5A44C4-4A0F-47D1-852B-0981E6628ABE\n    projectAbv:JOR\n    bucketName:ov_walk_files\n}\n```\nThe response will look similar to this:\n\n```\nhttps://storage.googleapis.com/ov_walk_files/JOR/6C5A44C4-4A0F-47D1-852B-0981E6628ABE/1626305726210/apple.wav?X-Goog-Algorithm=GOOG4-RSA-SHA256\u0026X-Goog-Credential=...\n```\nYou can then send a PUT request to the response url like so:\n```\ncurl -X PUT -H 'Content-Type: audio/x-wav' --upload-file apple.wav {SIGNED_URL}}\n```\n\n\n\n## ffmpegTrigger\n- Function called on cloud storage upload trigger of either .wav or .amr filetypes\n- Converts audio format to .mp3 and stores in cloud storage\n\n## Deployment\nThe following commands can be run to deploy both cloud functions:\n\n1.  `gcloud functions deploy generateUploadUrl --entry-point app --runtime nodejs14 --trigger-http --env-vars-file .env.yaml`\n\n\n\n2. `gcloud functions deploy ffmpegTrigger --runtime nodejs18 --trigger-resource ov_walk_files --trigger-event google.storage.object.finalize --max-instances 20 --timeout 120s --memory 256M --env-vars-file .env.yaml --docker-registry=artifact-registry`\n\nBoth `.env.yaml` files will need to be present in their corresponding deployment folders.\nRoot folder for generateUpload and ffmpeg_mp3_trigger for the gcloud storage activation trigger\n\n## Local development\n\nThe following launch.json file can be used for VSCode development\n\n```\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"type\": \"pwa-node\",\n            \"request\": \"launch\",\n            \"name\": \"Launch Program\",\n            \"skipFiles\": [\n                \"\u003cnode_internals\u003e/**\"\n            ],\n            \"program\": \"${workspaceFolder}/index.js\"\n            \n        },\n        {\n            \"name\": \"Launch via NPM\",\n            \"type\": \"node\",\n            \"request\": \"launch\",\n            \"cwd\": \"${workspaceFolder}\",\n            \"runtimeExecutable\": \"npm\",\n            \"runtimeArgs\": [\n                \"run-script\",\n                \"start\",\n                \"--\",\n                \"--inspect-brk=9229\"\n            ],\n            \"port\": 9229\n        }\n    ]\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusom%2Fourvoice_ffmpeg_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsusom%2Fourvoice_ffmpeg_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusom%2Fourvoice_ffmpeg_api/lists"}