From 0ec577195bb83a5b68492f058e740df6f2cfb900 Mon Sep 17 00:00:00 2001 From: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:22:23 -0500 Subject: [PATCH] Update readme and license --- LICENSE | 21 +++++++++++++++++++++ README.md | 35 ++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..3caf3c4d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 AssemblyAI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 5b406d0c..6f142253 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ [![Maven Central](https://img.shields.io/maven-central/v/com.assemblyai/assemblyai-java)](https://central.sonatype.com/artifact/com.assemblyai/assemblyai-java) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) +[![GitHub License](https://img.shields.io/github/license/AssemblyAI/assemblyai-java-sdk)](https://github.com/AssemblyAI/assemblyai-java-sdk/blob/master/LICENSE) +[![AssemblyAI Twitter](https://img.shields.io/twitter/follow/AssemblyAI?label=%40AssemblyAI&style=social)](https://twitter.com/AssemblyAI) +[![AssemblyAI YouTube](https://img.shields.io/youtube/channel/subscribers/UCtatfZMf-8EkIwASXM4ts0A)](https://www.youtube.com/@AssemblyAI) +[![Discord](https://img.shields.io/discord/875120158014853141?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.com%2Fchannels%2F875120158014853141&style=social) +](https://assemblyai.com/discord) ## Documentation @@ -43,8 +48,8 @@ import com.assemblyai.api.AssemblyAI; AssemblyAI aai = AssemblyAI.builder() .apiKey("YOUR_API_KEY") .build(); - -TranscriptResponse transcriptResponse = + +TranscriptResponse transcriptResponse = aai.transcript().get("transcript-id"); System.out.printlin("Received response!" + transcriptResponse); @@ -82,9 +87,9 @@ TranscriptResponse transcript = ``` ## Using the Realtime Transcriber -The Realtime Transcriber can be used to process any live +The Realtime Transcriber can be used to process any live audio streams and sends data over websockets. The Realtime Transcriber -will take event handlers +will take event handlers ```java import com.assemblyai.api.Transcriber; @@ -101,13 +106,13 @@ realtime.close(); ``` ## Staged Builders -The generated builders all follow the staged builder pattern. +The generated builders all follow the staged builder pattern. Read more [here](https://immutables.github.io/immutable.html#staged-builder). -Staged builders only allow you to construct the object once all required -properties have been specified. +Staged builders only allow you to construct the object once all required +properties have been specified. For example, in the snippet below, you will not be able to access the build -method on `CreateTranscriptParameters` until you have specified the mandatory +method on `CreateTranscriptParameters` until you have specified the mandatory audioUrl variable. ```java @@ -115,22 +120,22 @@ import com.assemblyai.api.CreateTranscriptParams; CreateTranscriptParameters params = CreateTranscriptParameters.builder() .audioUrl("https://...") - .build(); + .build(); ``` ## Beta status -This SDK is in beta, and there may be breaking changes between versions +This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning the package -version to a specific version in your build.gradle file. This way, you can +version to a specific version in your build.gradle file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version. ## Contributing -While we value open-source contributions to this SDK, this library -is generated programmatically. Additions made directly to this library -would have to be moved over to our generation code, otherwise they would +While we value open-source contributions to this SDK, this library +is generated programmatically. Additions made directly to this library +would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a -proof of concept, but know that we will not be able to merge it as-is. +proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! On the other hand, contributions to the README are always very welcome!