Skip to content

Commit

Permalink
Add icon, banner, improve package spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Aug 1, 2024
1 parent af76463 commit cadefea
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 32 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 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.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<img src="https://github.com/AssemblyAI/assemblyai-python-sdk/blob/master/assemblyai.png?raw=true" width="500" alt="AssemblyAI logo"/>

---

# AssemblyAI C# .NET SDK

[![NuGet](https://img.shields.io/nuget/v/AssemblyAI.svg)](https://www.nuget.org/packages/AssemblyAI.net/)
Expand All @@ -7,7 +11,7 @@
[![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)

The AssemblyAI C# SDK provides an easy-to-use interface for interacting with the AssemblyAI API from .NET, which supports async and real-time transcription, as well as the latest audio intelligence and LeMUR models.
The AssemblyAI C# SDK provides an easy-to-use interface for interacting with the AssemblyAI API from .NET, which supports async and real-time transcription, as well as the latest audio intelligence and LeMUR models.
The C# SDK is compatible with `.NET 6.0` and up, `.NET Framework 4.6.2` and up, and `.NET Standard 2.0`.

## Documentation
Expand Down Expand Up @@ -35,7 +39,7 @@ You can now use the `client` object to interact with the AssemblyAI API.

## Add the AssemblyAIClient to the dependency injection container

The AssemblyAI SDK has built-in support for default .NET dependency injection container.
The AssemblyAI SDK has built-in support for default .NET dependency injection container.
Add the `AssemblyAIClient` to the service collection like this:

```csharp
Expand Down Expand Up @@ -118,7 +122,7 @@ var client = new AssemblyAIClient(Environment.GetEnvironmentVariable("ASSEMBLYAI

// Transcribe file using file info
var transcript = await client.Transcripts.TranscribeAsync(
new FileInfo("./news.mp4"),
new FileInfo("./news.mp4"),
new TranscriptOptionalParams
{
LanguageCode = TranscriptLanguageCode.EnUs
Expand All @@ -128,7 +132,7 @@ var transcript = await client.Transcripts.TranscribeAsync(
// Transcribe file from stream
await using var stream = new FileStream("./news.mp4", FileMode.Open);
transcript = await client.Transcripts.TranscribeAsync(
stream,
stream,
new TranscriptOptionalParams
{
LanguageCode = TranscriptLanguageCode.EnUs
Expand All @@ -142,7 +146,7 @@ If you don't want to wait until the transcript is ready, you can use `submit`:

```csharp
transcript = await client.Transcripts.SubmitAsync(
new FileInfo("./news.mp4"),
new FileInfo("./news.mp4"),
new TranscriptOptionalParams
{
LanguageCode = TranscriptLanguageCode.EnUs
Expand Down Expand Up @@ -273,7 +277,7 @@ using AssemblyAI.Realtime;
await using var transcriber = client.Realtime.Transcriber(new RealtimeTranscriberOptions
{
// If ApiKey is null, the API key passed to `AssemblyAIClient` will be
ApiKey: Environment.GetEnvironmentVariable("ASSEMBLYAI_API_KEY"),
ApiKey: Environment.GetEnvironmentVariable("ASSEMBLYAI_API_KEY"),
RealtimeUrl = "wss://localhost/override",
SampleRate = 16_000,
WordBoost = new[] { "foo", "bar" }
Expand All @@ -289,13 +293,13 @@ await using var transcriber = client.Realtime.Transcriber(new RealtimeTranscribe
> var token = await client.Realtime.CreateTemporaryTokenAsync(expiresIn: 60);
> // TODO: return token to client
> ```
>
>
> _Client code_:
>
> ```csharp
> using AssemblyAI;
> using AssemblyAI.Realtime;
>
>
> var token = await GetToken();
> await using var transcriber = new RealtimeTranscriber {
> Token = token.Token
Expand Down
Binary file added assemblyai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions src/AssemblyAI.IntegrationTests/AssemblyAI.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="NUnit" Version="3.14.0"/>
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 11 additions & 5 deletions src/AssemblyAI.UnitTests/AssemblyAI.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2"/>
<PackageReference Include="NUnit.Analyzers" Version="3.6.1"/>
<PackageReference Include="coverlet.collector" Version="3.2.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
56 changes: 43 additions & 13 deletions src/AssemblyAI/AssemblyAI.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
Expand All @@ -7,23 +7,53 @@
<NuGetAudit>false</NuGetAudit>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<Version>1.0.0-beta</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RootNamespace>AssemblyAI</RootNamespace>
<AssemblyName>AssemblyAI</AssemblyName>
<PackageId>AssemblyAI</PackageId>
<Version>1.0.0-beta1</Version>
<Title>AssemblyAI C# .NET SDK</Title>
<Authors>AssemblyAI</Authors>
<Description>The AssemblyAI C# .NET SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, audio intelligence models, as well as the latest LeMUR models.</Description>
<Copyright>Copyright 2024 (c) AssemblyAI, Inc. All rights reserved.</Copyright>
<PackageTags>ASR;Speech-To-Text;STT;Speech;AI;AssemblyAI</PackageTags>
<Company>AssemblyAI</Company>
<Product>AssemblyAI</Product>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<PackageVersion>1.0.0-beta1</PackageVersion>
<OutputType>Library</OutputType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/AssemblyAI/assemblyai-csharp-sdk</PackageProjectUrl>
<RepositoryUrl>https://github.com/AssemblyAI/assemblyai-csharp-sdk.git</RepositoryUrl>
<PackageIconUrl>https://www.assemblyai.com/favicon.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition="'$(CI)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0'">
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Portable.System.DateTimeOnly" Version="8.0.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="PolySharp" Version="1.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -42,15 +72,15 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="OneOf" Version="3.0.263" />
<PackageReference Include="OneOf.Extended" Version="3.0.263" />
<PackageReference Include="OneOf" Version="3.0.271" />
<PackageReference Include="OneOf.Extended" Version="3.0.271" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>

<ItemGroup>
<None Include="..\..\icon.png" Pack="true" PackagePath="\" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/AssemblyAI/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace AssemblyAI.Core;

internal static class Constants
{
internal const string Version = "1.0.0-beta";
internal const string Version = "1.0.0-beta1";
public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK";
}

0 comments on commit cadefea

Please sign in to comment.