Skip to content

Commit 60fe23a

Browse files
Greg HolmesGregHolmes
authored andcommitted
feat: initial SDK with full API coverage
0 parents  commit 60fe23a

580 files changed

Lines changed: 92089 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# EditorConfig: https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = space
8+
indent_size = 4
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.java]
13+
indent_size = 2
14+
15+
[*.{gradle,groovy}]
16+
indent_size = 2
17+
18+
[*.{yml,yaml}]
19+
indent_size = 2
20+
21+
[*.{json,xml}]
22+
indent_size = 2
23+
24+
[*.md]
25+
trim_trailing_whitespace = false
26+
27+
[Makefile]
28+
indent_style = tab

.fern/metadata.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"cliVersion": "4.4.1",
3+
"generatorName": "fernapi/fern-java-sdk",
4+
"generatorVersion": "4.0.3",
5+
"generatorConfig": {
6+
"client": {
7+
"class-name": "DeepgramClient"
8+
}
9+
}
10+
}

.githooks/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
echo "Running pre-commit checks..."
5+
6+
# Check if gradlew is available and executable
7+
if [ ! -x "./gradlew" ]; then
8+
echo "Error: gradlew not found or not executable"
9+
exit 1
10+
fi
11+
12+
make check
13+
14+
echo "All pre-commit checks passed!"

.github/workflows/check-lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- "src/**/*.java"
8+
- "build.gradle"
9+
- "settings.gradle"
10+
- ".github/workflows/check-lint.yml"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
lint:
17+
name: Spotless Check
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Java 17
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: temurin
28+
java-version: "17"
29+
30+
- name: Cache Gradle packages
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.gradle/caches
35+
~/.gradle/wrapper
36+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
37+
restore-keys: |
38+
${{ runner.os }}-gradle-
39+
40+
- name: Run Spotless check
41+
run: ./gradlew spotlessCheck
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Integration Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 9 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
integration-tests:
13+
name: Integration Tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Java 17
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: temurin
24+
java-version: "17"
25+
26+
- name: Cache Gradle packages
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.gradle/caches
31+
~/.gradle/wrapper
32+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33+
restore-keys: |
34+
${{ runner.os }}-gradle-
35+
36+
- name: Build project
37+
run: ./gradlew build -x test -x spotlessCheck
38+
39+
- name: Run integration tests
40+
env:
41+
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
42+
run: ./gradlew integrationTest

.github/workflows/tests-unit.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
unit-tests:
12+
name: Unit Tests
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Java 17
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: "17"
24+
25+
- name: Cache Gradle packages
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.gradle/caches
30+
~/.gradle/wrapper
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
32+
restore-keys: |
33+
${{ runner.os }}-gradle-
34+
35+
- name: Build project
36+
run: ./gradlew build -x test -x spotlessCheck
37+
38+
- name: Run unit tests
39+
run: ./gradlew unitTest

.gitignore

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Gradle
2+
.gradle/
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
6+
# Maven
7+
target/
8+
9+
# Java
10+
*.class
11+
*.jar
12+
*.war
13+
*.ear
14+
*.nar
15+
hs_err_pid*
16+
replay_pid*
17+
18+
# IDE - IntelliJ IDEA
19+
.idea/
20+
*.iml
21+
*.iws
22+
*.ipr
23+
out/
24+
25+
# IDE - Eclipse
26+
.classpath
27+
.project
28+
.settings/
29+
bin/
30+
31+
# IDE - VS Code
32+
.vscode/
33+
34+
# IDE - NetBeans
35+
nbproject/
36+
nbbuild/
37+
nbdist/
38+
.nb-gradle/
39+
40+
# OS files
41+
.DS_Store
42+
Thumbs.db
43+
ehthumbs.db
44+
Desktop.ini
45+
46+
# Environment
47+
.env
48+
.env.local
49+
.env.*.local
50+
51+
# Example output files
52+
output*.mp3
53+
output*.wav
54+
55+
# Logs
56+
*.log
57+
58+
# Audio test files
59+
Bueller-Life-moves-pretty-fast.wav
60+
61+
# Fern review/issue files
62+
reference.md
63+
FERN_ISSUES.md
64+
FERN_ISSUES.txt
65+
FERN_ISSUES_V4.txt
66+
FERN_REPLY.txt
67+
ISSUES.md
68+
SDK_REVIEW.md

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.1.0] - Unreleased
8+
9+
### Features
10+
11+
- Initial release of Deepgram Java SDK
12+
- Support for Speech-to-Text (Listen) REST API
13+
- Support for Text-to-Speech (Speak) REST API
14+
- Support for Text Intelligence (Read) API
15+
- Support for Voice Agent configuration API
16+
- Support for Management API (projects, keys, members, usage, billing)
17+
- Support for Auth API (token generation)
18+
- Support for Self-Hosted API (distribution credentials)
19+
- WebSocket support for Listen (real-time streaming transcription)
20+
- WebSocket support for Speak (real-time streaming TTS)
21+
- WebSocket support for Agent (real-time voice agent)
22+
- Synchronous and asynchronous client variants
23+
- Automatic API key loading from DEEPGRAM_API_KEY environment variable
24+
- Configurable timeouts and retry policies
25+
- Custom OkHttp client support
26+
- Raw HTTP response access for all endpoints
27+
- Structured error handling
28+
- Google Java Format enforcement via Spotless
29+
30+
### Notes
31+
32+
- Minimum Java version: 11
33+
- Built on OkHttp 4.12.0 and Jackson 2.18.2
34+
- Generated using Fern SDK generator
35+
- Based on OpenAPI specification from [deepgram-api-specs](https://github.com/deepgram/deepgram-api-specs)

0 commit comments

Comments
 (0)