Skip to content

Commit

Permalink
Use API key in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Apr 23, 2024
1 parent 64bb37b commit d63db1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sample-app/src/main/java/sample/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public static void main(String... args) throws IOException, InterruptedException
);

try (RealtimeTranscriber realtimeTranscriber = RealtimeTranscriber.builder()
.token(tokenResponse.getToken())
.apiKey(System.getenv("ASSEMBLYAI_API_KEY"))
// alternatively, use token
// .token(tokenResponse.getToken())
.encoding(AudioEncoding.PCM_S16LE)
.onSessionBegins(System.out::println)
.onPartialTranscript(System.out::println)
Expand Down

0 comments on commit d63db1f

Please sign in to comment.