{"id":23086157,"url":"https://github.com/umarquez/goai_transcriber","last_synced_at":"2025-04-03T15:32:37.691Z","repository":{"id":193120235,"uuid":"688156033","full_name":"umarquez/goai_transcriber","owner":"umarquez","description":"Go based OpenAI audio files transcriber","archived":false,"fork":false,"pushed_at":"2024-12-12T00:10:25.000Z","size":53,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T04:25:38.985Z","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/umarquez.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":"2023-09-06T19:06:57.000Z","updated_at":"2024-06-05T07:03:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"3799a892-3a62-4a84-a00a-73305076a7e4","html_url":"https://github.com/umarquez/goai_transcriber","commit_stats":null,"previous_names":["umarquez/goai_transcriber"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarquez%2Fgoai_transcriber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarquez%2Fgoai_transcriber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarquez%2Fgoai_transcriber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarquez%2Fgoai_transcriber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umarquez","download_url":"https://codeload.github.com/umarquez/goai_transcriber/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247027757,"owners_count":20871584,"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-12-16T18:16:56.939Z","updated_at":"2025-04-03T15:32:37.665Z","avatar_url":"https://github.com/umarquez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GoAI Transcriber\n\nGoAI Transcriber is a tool that uses OpenAI's Whisper model to transcribe audio files. It supports various audio formats including `.m4a` and converts them to `.mp3` before processing if necessary.\n\n## Features\n\n- Transcribes audio files using OpenAI's Whisper model.\n- Supports the following audio formats: `.mp3`, `.mp4`, `.mpeg`, `.mpga`, `.m4a`, `.wav`, `.webm`.\n- Automatically converts `.m4a` files to `.mp3` for processing.\n- Provides a REST API for uploading and transcribing audio files.\n- Includes Swagger documentation for easy API exploration.\n\n## Project Structure\n\n```\n.\n├── cmd\n│   ├── api\n│   │   └── main.go\n│   └── app\n│       └── main.go\n├── deployment\n│   ├── Dockerfile\n│   ├── Dockerfile.api\n│   ├── docker-compose.yml\n│   ├── docker-compose.api.yml\n│   ├── terraform\n│   │   ├── main.tf\n│   │   └── variables.tf\n├── internal\n│   ├── api\n│   │   └── api.go\n│   ├── app\n│   │   ├── app.go\n│   │   └── functions.go\n│   ├── controller\n│   │   └── transcription.go\n│   ├── entity\n│   │   └── transcription.go\n│   ├── repository\n│   │   └── transcription.go\n│   └── usecase\n│       └── transcription.go\n├── pkg\n│   └── openai\n│       └── api.go\n├── docs\n│   ├── docs.go\n│   ├── swagger.json\n│   └── swagger.yaml\n├── go.mod\n├── go.sum\n├── LICENSE\n├── Makefile\n├── README.md\n└── .env\n```\n\n## Installation\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/umarquez/goai_transcriber.git\n   cd goai_transcriber\n   ```\n\n2. **Set up environment variables:**\n   Create a `.env` file and add your OpenAI token:\n   ```sh\n   APP_OPENAI_TOKEN=your_openai_token\n   APP_WORKING_PATH=./audios\n   ```\n\n## Running the Application\n\n### Running the Application Locally\n\n#### Standard Application\n\n1. **Build and run the application:**\n   ```sh\n   go build -o bin/app cmd/app/main.go\n   ./bin/app\n   ```\n\n2. **Transcribe audio files:**\n   - The application reads the content of the `./audios` directory.\n   - If there are `.m4a` files, they are converted to `.mp3` due to an error from the OpenAI API processing `.m4a` files.\n   - The transcription result is written to the same directory with a `.txt` extension.\n\n#### API Version\n\n1. **Generate Swagger documentation:**\n   ```sh\n   swag init --parseDependency --parseInternal -g cmd/api/main.go -o ./docs\n   ```\n\n2. **Build and run the API:**\n   ```sh\n   go build -o bin/api cmd/api/main.go\n   ./bin/api\n   ```\n\n3. **Transcribe audio files via API:**\n   Use a tool like `curl` or Postman to send a `POST` request to the `/transcribe` endpoint with your audio file.\n\n   Example `curl` command:\n   ```sh\n   curl -X POST \"http://localhost:8080/transcribe\" -H \"accept: application/json\" -H \"Content-Type: multipart/form-data\" -F \"file=@path/to/your/audiofile.m4a\"\n   ```\n\n### Running the Application Using Docker\n\n#### Standard Application\n\n1. **Build and run the application using Docker:**\n   ```sh\n   docker-compose -f deployment/docker-compose.yml up --build\n   ```\n\n2. **Transcribe audio files:**\n   Place your audio files in the `audios` directory and the application will automatically process and transcribe them.\n\n#### API Version\n\n1. **Build and run the API using Docker:**\n   ```sh\n   docker-compose -f deployment/docker-compose.api.yml up --build\n   ```\n\n2. **Transcribe audio files via API:**\n   Use a tool like `curl` or Postman to send a `POST` request to the `/transcribe` endpoint with your audio file.\n\n   Example `curl` command:\n   ```sh\n   curl -X POST \"http://localhost:8080/transcribe\" -H \"accept: application/json\" -H \"Content-Type: multipart/form-data\" -F \"file=@path/to/your/audiofile.m4a\"\n   ```\n\n## API Documentation\n\nThe API is documented using Swagger. Once the application is running, you can access the documentation at:\n```\nhttp://localhost:8080/swagger/index.html\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumarquez%2Fgoai_transcriber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumarquez%2Fgoai_transcriber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumarquez%2Fgoai_transcriber/lists"}