-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dvonthenen
committed
Mar 28, 2024
1 parent
e62992e
commit ca5d6bc
Showing
55 changed files
with
972 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Deepgram.Microphone; | ||
|
||
public static class Defaults | ||
{ | ||
// Default sample rate | ||
public const int RATE = 16000; | ||
|
||
// Number of channels | ||
public const int CHANNELS = 1; | ||
|
||
// Default chunk size | ||
public const int CHUNK_SIZE = 8194; | ||
|
||
// Default input device index | ||
public const SampleFormat SAMPLE_FORMAT = SampleFormat.Int16; | ||
|
||
// Default input device index | ||
public const int DEVICE_INDEX = PortAudio.NoDevice; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(SolutionFileName)' == 'Deepgram.sln'"> | ||
<!-- Properties related to NuGet packaging: --> | ||
<IsPackable>true</IsPackable> | ||
<Company>Deepgram</Company> | ||
<PackageId>Deepgram.Microphone</PackageId> | ||
<Title>Deepgram .NET Microphone</Title> | ||
<Description>Helper Microphone Package</Description> | ||
<Summary>Helper Microphone Package</Summary> | ||
<Authors>Deepgram .NET SDK Contributors</Authors> | ||
<Copyright>2024 Deepgram</Copyright> | ||
<PackageIcon>dg_logo.png</PackageIcon> | ||
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://developers.deepgram.com/sdks-tools/sdks/dotnet-sdk/</PackageProjectUrl> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<RepositoryUrl>https://github.com/deepgram/deepgram-dotnet-sdk</RepositoryUrl> | ||
<PackageTags>speech-to-text,captions,speech-recognition,deepgram,dotnet</PackageTags> | ||
<EnableNETAnalyzers>True</EnableNETAnalyzers> | ||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(SolutionFileName)' == 'Deepgram.DevBuild.sln'"> | ||
<!-- Properties related to NuGet packaging: --> | ||
<IsPackable>true</IsPackable> | ||
<Company>Deepgram</Company> | ||
<PackageId>Deepgram.Unstable.Microphone.Builds</PackageId> | ||
<Title>Deepgram.Microphone - UNSTABLE DEVELOPER BUILDS</Title> | ||
<Description>UNSTABLE DEVELOPER BUILDS - Deepgram .NET Microphone</Description> | ||
<Summary>UNSTABLE DEVELOPER BUILDS - Deepgram .NET Microphone</Summary> | ||
<Authors>Deepgram .NET SDK Contributors</Authors> | ||
<Copyright>2024 Deepgram</Copyright> | ||
<PackageIcon>dg_logo.png</PackageIcon> | ||
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://developers.deepgram.com/sdks-tools/sdks/dotnet-sdk/</PackageProjectUrl> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<RepositoryUrl>https://github.com/deepgram/deepgram-dotnet-sdk</RepositoryUrl> | ||
<PackageTags>speech-to-text,captions,speech-recognition,deepgram,dotnet</PackageTags> | ||
<EnableNETAnalyzers>True</EnableNETAnalyzers> | ||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'"> | ||
<WarningLevel>7</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'"> | ||
<WarningLevel>7</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'"> | ||
<WarningLevel>7</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'"> | ||
<WarningLevel>7</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.*" /> | ||
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" /> | ||
<PackageReference Include="System.Text.Json" Version="6.*" /> | ||
<PackageReference Include="System.Threading.Channels" Version="6.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.1" /> | ||
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" /> | ||
<PackageReference Include="System.Text.Json" Version="8.0.1" /> | ||
<PackageReference Include="System.Threading.Channels" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.*" /> | ||
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" /> | ||
<PackageReference Include="System.Text.Json" Version="7.*" /> | ||
<PackageReference Include="System.Threading.Channels" Version="7.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.*" /> | ||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.*" /> | ||
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" /> | ||
<PackageReference Include="System.Text.Json" Version="8.*" /> | ||
<PackageReference Include="System.Threading.Channels" Version="8.*" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<None Include="..\extras\dg_logo.png"> | ||
<Pack>True</Pack> | ||
<PackagePath>\</PackagePath> | ||
</None> | ||
<None Include="..\README.md"> | ||
<Pack>True</Pack> | ||
<PackagePath>\</PackagePath> | ||
</None> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="PortAudioSharp2" Version="1.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright 2024 Deepgram .NET SDK contributors. All Rights Reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// SPDX-License-Identifier: MIT | ||
|
||
global using PortAudioSharp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
| ||
namespace Deepgram.Microphone; | ||
|
||
public class Library | ||
{ | ||
public static void Initialize() | ||
{ | ||
// TODO: logging | ||
Console.WriteLine("Portaudio Version: {0}\n\n", PortAudio.VersionInfo.versionText); | ||
PortAudio.Initialize(); | ||
} | ||
|
||
public static void Terminate() | ||
{ | ||
// TODO: logging | ||
// Terminate PortAudio | ||
PortAudio.Terminate(); | ||
} | ||
} |
Oops, something went wrong.