{"id":51027196,"url":"https://github.com/deepgram/spec-mock-go-sdk","last_synced_at":"2026-06-21T20:30:49.450Z","repository":{"id":360488653,"uuid":"1233859084","full_name":"deepgram/spec-mock-go-sdk","owner":"deepgram","description":"Mock fan-out target for Smithy spec → Go SDK regen testing. Not for public consumption.","archived":false,"fork":false,"pushed_at":"2026-05-26T15:29:08.000Z","size":7208,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T17:21:18.965Z","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/deepgram.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T12:55:40.000Z","updated_at":"2026-05-26T15:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deepgram/spec-mock-go-sdk","commit_stats":null,"previous_names":["deepgram/spec-mock-go-sdk"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/deepgram/spec-mock-go-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fspec-mock-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fspec-mock-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fspec-mock-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fspec-mock-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepgram","download_url":"https://codeload.github.com/deepgram/spec-mock-go-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fspec-mock-go-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34625624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-21T20:30:47.213Z","updated_at":"2026-06-21T20:30:49.436Z","avatar_url":"https://github.com/deepgram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deepgram Go SDK (spec-mock)\n\nGo SDK for the Deepgram speech-to-text platform: prerecorded\ntranscription, live streaming transcription, WebSocket, HTTP, and\nSageMaker transports, smart formatting, diarization, language\ndetection, entity detection, intents, sentiment, summarization, topic\ndetection. Runs on Go 1.24+. This is the prototype implementation\ngenerated by the Deepgram Smithy spec pipeline; see [`REGEN.md`](REGEN.md)\nfor the pipeline and maintainer guide.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/deepgram/spec-mock-go-sdk.svg)](https://pkg.go.dev/github.com/deepgram/spec-mock-go-sdk)\n\n## Install\n\n```bash\ngo get github.com/deepgram/spec-mock-go-sdk\n```\n\n## Quick start: prerecorded transcription\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tprerecorded \"github.com/deepgram/spec-mock-go-sdk/pkg/client/listen/v1/prerecorded\"\n)\n\nfunc main() {\n\tclient := prerecorded.New(prerecorded.WithAPIKey(os.Getenv(\"DEEPGRAM_API_KEY\")))\n\tresp, err := client.FromURL(context.Background(),\n\t\t\"https://dpgr.am/spacewalk.wav\",\n\t\t\u0026prerecorded.PreRecordedTranscriptionOptions{\n\t\t\tModel:       \"nova-3\",\n\t\t\tPunctuate:   true,\n\t\t\tSmartFormat: true,\n\t\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(resp.RequestID)\n}\n```\n\nRunnable examples for every public method:\n\n- [`Client.FromURL`](pkg/client/listen/v1/prerecorded/example_test.go) — transcribe a remote URL.\n- [`Client.FromFile`](pkg/client/listen/v1/prerecorded/example_test.go) — transcribe a local file.\n- [`Client.FromStream`](pkg/client/listen/v1/prerecorded/example_test.go) — transcribe an `io.Reader`.\n- [`PreRecordedTranscriptionOptions`](pkg/client/listen/v1/prerecorded/example_test.go) — typed options plus additional query parameters.\n- [`WithSageMakerTransport`](pkg/client/listen/v1/prerecorded/example_test.go) — route prerecorded transcription through SageMaker.\n\nFull godoc:\n[`pkg.go.dev/.../listen/v1/prerecorded`](https://pkg.go.dev/github.com/deepgram/spec-mock-go-sdk/pkg/client/listen/v1/prerecorded)\n\n## Quick start: live streaming transcription\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tlive \"github.com/deepgram/spec-mock-go-sdk/pkg/client/listen/v1/live\"\n)\n\nfunc main() {\n\tclient := live.New(live.WithAPIKey(os.Getenv(\"DEEPGRAM_API_KEY\")))\n\tstream, err := client.Connect(context.Background(),\n\t\t\u0026live.LiveTranscriptionOptions{\n\t\t\tModel:          \"nova-3\",\n\t\t\tEncoding:       \"linear16\",\n\t\t\tSampleRate:     16000,\n\t\t\tInterimResults: true,\n\t\t\tSmartFormat:    true,\n\t\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer stream.Close()\n\n\tgo func() {\n\t\taudio := readAudioBytes()\n\t\t_ = stream.SendAudio(audio)\n\t\t_ = stream.CloseStream()\n\t}()\n\n\tfor {\n\t\tevent, err := stream.Recv()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tswitch event.(type) {\n\t\tcase *live.ResultsEvent:\n\t\tcase *live.MetadataEvent:\n\t\t\treturn\n\t\tcase *live.ErrorEvent:\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc readAudioBytes() []byte { return nil }\n```\n\nRunnable examples for every public method:\n\n- [`Client.Connect`](pkg/client/listen/v1/live/example_test.go) — open a streaming session.\n- [`Stream.SendAudio`](pkg/client/listen/v1/live/example_test.go) — send raw audio bytes.\n- [`Stream.Recv`](pkg/client/listen/v1/live/example_test.go) — receive the next event.\n- [`Stream.Finalize`](pkg/client/listen/v1/live/example_test.go) — force a final result.\n- [`Stream.KeepAlive`](pkg/client/listen/v1/live/example_test.go) — keep the session alive.\n- [`Stream.CloseStream`](pkg/client/listen/v1/live/example_test.go) — graceful end-of-audio.\n- [`LiveTranscriptionOptions`](pkg/client/listen/v1/live/example_test.go) — typed live options.\n- [`WithSageMakerBidiTransport`](pkg/client/listen/v1/live/example_test.go) — route live streaming through SageMaker HTTP/2.\n\nFull godoc:\n[`pkg.go.dev/.../listen/v1/live`](https://pkg.go.dev/github.com/deepgram/spec-mock-go-sdk/pkg/client/listen/v1/live)\n\n## Auth\n\nBoth clients pick up credentials from the environment by default:\n\n```bash\nexport DEEPGRAM_API_KEY=\"your_api_key\"\n# or, for Bearer-token auth:\nexport DEEPGRAM_ACCESS_TOKEN=\"your_access_token\"\n```\n\n`prerecorded.New()` and `live.New()` read these automatically. Pass\n`prerecorded.WithAPIKey`, `prerecorded.WithAccessToken`,\n`live.WithAPIKey`, or `live.WithAccessToken` to provide credentials\nexplicitly. When both are set, the access token wins.\n\nFor custom configurations:\n\n```go\nclient := prerecorded.New(\n\tprerecorded.WithAPIKey(\"dg-key\"),\n\tprerecorded.WithBaseURL(\"https://api.example.com\"),\n\tprerecorded.WithHTTPClient(myHTTPClient),\n)\n```\n\n## Test the examples\n\nEvery `Example_*` function in `pkg/.../example_test.go` is runnable\nvia `go test`:\n\n```bash\ngo test ./pkg/...\n```\n\nExamples without an `// Output:` assertion are compile-checked.\nExamples with one are also output-asserted. If a method signature\nchanges and an example stops compiling, the test suite fails.\n\nStandalone programs live in [`examples/`](examples):\n\n```bash\ngo build ./examples/...\n```\n\n## What's in this SDK\n\n| Surface | Package |\n|---|---|\n| Prerecorded transcription (`POST /v1/listen`) | `pkg/client/listen/v1/prerecorded` |\n| Live streaming transcription (`WS /v1/listen`) | `pkg/client/listen/v1/live` |\n| SageMaker request/response and bidirectional streaming transports | `api/transport/sagemaker` |\n\nOther products (text-to-speech, voice agent, etc.) land per-product\nas the SDK grows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fspec-mock-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepgram%2Fspec-mock-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fspec-mock-go-sdk/lists"}