{"id":21359253,"url":"https://github.com/alesr/scriber","last_synced_at":"2025-06-30T06:35:35.647Z","repository":{"id":260691085,"uuid":"882079986","full_name":"alesr/scriber","owner":"alesr","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-01T23:01:47.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T06:26:47.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alesr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-11-01T20:55:05.000Z","updated_at":"2024-11-01T23:01:50.000Z","dependencies_parsed_at":"2024-11-01T21:28:06.637Z","dependency_job_id":"bef1902b-f5f8-40d5-afba-10a6afd137b8","html_url":"https://github.com/alesr/scriber","commit_stats":null,"previous_names":["alesr/scriber"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alesr/scriber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesr%2Fscriber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesr%2Fscriber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesr%2Fscriber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesr%2Fscriber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alesr","download_url":"https://codeload.github.com/alesr/scriber/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesr%2Fscriber/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262724625,"owners_count":23354289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-22T05:27:17.310Z","updated_at":"2025-06-30T06:35:35.626Z","avatar_url":"https://github.com/alesr.png","language":"Go","readme":"# Scriber\n\nScriber is a Go service that processes audio files and transcribes them into subtitles or transcripts using the Whisper API.\n\n## Features\n\n- Convert audio files to WAV format using `ffmpeg`\n- Transcribe audio files into subtitles (`.srt`) or transcripts (`.txt`)\n- Supports multiple languages\n\n## Installation\n\n1. Clone the repository:\n\n    ```sh\n    git clone https://github.com/alesr/scriber.git\n    cd scriber\n    ```\n\n2. Install dependencies:\n\n    ```sh\n    go mod download\n    ```\n\n3. Ensure `ffmpeg` is installed on your system:\n\n    ```sh\n    # On macOS\n    brew install ffmpeg\n\n    # On Ubuntu\n    sudo apt-get install ffmpeg\n    ```\n\n## Usage\n\n### Example\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"os\"\n    \"log/slog\"\n\n    \"github.com/alesr/scriber\"\n    \"github.com/alesr/whisperclient\"\n)\n\nfunc main() {\n    logger := slog.Default()\n    whisperCli := whisperclient.NewClient(\"your-api-key\")\n\n    s := scriber.New(logger, whisperCli)\n\n    inputFile, err := os.Open(\"path/to/example.mp4\")\n    if err != nil {\n        logger.Error(\"Failed to open input file\", slog.Error(err))\n        os.Exit(1)\n    }\n    defer inputFile.Close()\n\n    input := scriber.Input{\n        Name:       \"example.mp4\",\n        OutputType: scriber.OutputTypeSubtitles,\n        Language:   \"en\",\n        Data:       inputFile,\n    }\n\n    ctx := context.Background()\n    if err := s.Process(ctx, input); err != nil {\n        logger.Error(\"Failed to process file\", slog.Error(err))\n        os.Exit(1)\n    }\n\n    for result := range s.Collect() {\n        logger.Info(\"Transcription result\", slog.String(\"file\", result.Name), slog.String(\"text\", string(result.Text)))\n    }\n}\n\n```\n\n## Testing\n\nRun the tests:\n\n```sh\ngo test ./...\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falesr%2Fscriber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falesr%2Fscriber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falesr%2Fscriber/lists"}