Skip to content

Commit

Permalink
Fix hyperlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Dec 28, 2023
1 parent 9b77b1e commit e56a921
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,5 @@ $RECYCLE.BIN/
# content below from: OoLunar
.env
logs/
res/config.debug.json
res/config.debug.json
docs/_site
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<ProjectRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "DeepgramSharp.sln"))</ProjectRoot>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<TargetFramework>net8.0</TargetFramework>
<Version>1.2.0</Version>
<Version Condition="'$(Nightly)' != ''">$(Version)-nightly-$(Nightly)</Version>
<Version Condition="'$(PR)' != ''">$(Version)-pr-$(PR)</Version>
<Version>1.1.0</Version>
</PropertyGroup>
<!-- Nuget -->
<PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ while((response = await livestreamApi.ReceiveTranscriptionAsync()) != null)
}
```

Refer to the [Using the Livestream API](docs/tutorials/live-api.md) tutorial for detailed usage instructions.
Refer to the [Using the Livestream API](https://www.forsaken-borders.net/DeepgramSharp/tutorials/live-api.md) tutorial for detailed usage instructions.

### Pre-recorded API

Expand All @@ -68,11 +68,11 @@ var transcription = await client.SendAudioAsync(audioData, new DeepgramAudioOpti
});
```

Refer to the [Using the Pre-recorded API](docs/tutorials/prerecorded-api.md) tutorial for detailed usage instructions.
Refer to the [Using the Pre-recorded API](https://www.forsaken-borders.net/DeepgramSharp/tutorials/prerecorded-api.md) tutorial for detailed usage instructions.

## Examples

Examples can be found in the [examples](examples/) directory. They demonstrate usage of both the Livestream and Pre-recorded APIs.
Examples can be found in the [examples](https://github.com/OoLunar/DeepgramSharp/tree/master/examples) directory. They demonstrate usage of both the Livestream and Pre-recorded APIs.

## API Documentation

Expand Down
2 changes: 2 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- name: Home
href: index.md
- name: Api Documentation
href: api/
homepage: api/index.md
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/live-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ The livestream API allows you to transcribe audio streams in real-time. You can

1. **Initialize the Deepgram Client**

You'll need to initialize the [`DeepgramClient`]("src/DeepgramClient.cs") with your API key. If desired, you can provide your own custom logger which will be helpful for debugging. By default, all clients use a `NullLogger`. Here's how you can do it:
You'll need to initialize the [`DeepgramClient`]("https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramClient.cs") with your API key. If desired, you can provide your own custom logger which will be helpful for debugging. By default, all clients use a `NullLogger`. Here's how you can do it:

```csharp
var client = new DeepgramClient("your-api-key", myCustomLogger);
```

2. **Create a connection**

Now you can use the `DeepgramLivestreamApi` class to interact with the livestream API. In order to translate audio in real time, you must first create a connection. By default, the library will return the [`DeepgramLivestreamApi`](src/DeepgramLivestreamApi.cs) object soon as audio can be sent. Additionally, the [`DeepgramLivestreamApi`](src/DeepgramLivestreamApi.cs) class will also handle the keep alive for you. As with all other API methods, use can pass a cancellation token to the method to cancel the operation. Here's an example of how you can do this:
Now you can use the `DeepgramLivestreamApi` class to interact with the livestream API. In order to translate audio in real time, you must first create a connection. By default, the library will return the [`DeepgramLivestreamApi`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramLivestreamApi.cs) object soon as audio can be sent. Additionally, the [`DeepgramLivestreamApi`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramLivestreamApi.cs) class will also handle the keep alive for you. As with all other API methods, use can pass a cancellation token to the method to cancel the operation. Here's an example of how you can do this:
```csharp
var livestreamApi = await client.CreateLivestreamAsync(new DeepgramLivestreamOptionCollection()
Expand All @@ -30,7 +30,7 @@ The livestream API allows you to transcribe audio streams in real-time. You can
await livestreamApi.SendAudioAsync(audioData);
```

Deepgram accepts numerous audio formats and will attempt to detect the format automatically. If there's a specific audio format you wish to use, you can specify the parameters within the [`DeepgramLivestreamOptionCollection`](src/DeepgramLivestreamOptionCollection.cs) object:
Deepgram accepts numerous audio formats and will attempt to detect the format automatically. If there's a specific audio format you wish to use, you can specify the parameters within the [`DeepgramLivestreamOptionCollection`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramLivestreamOptionCollection.cs) object:

```csharp
var livestreamApi = await client.CreateLivestreamAsync(new DeepgramLivestreamOptionCollection()
Expand Down Expand Up @@ -71,10 +71,10 @@ The livestream API allows you to transcribe audio streams in real-time. You can

6. **Closing the livestream**

You can let Deepgram know you're done sending audio through the [`RequestClosureAsync`](src/DeepgramLivestreamApi.cs) method:
You can let Deepgram know you're done sending audio through the [`RequestClosureAsync`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramLivestreamApi.cs) method:

```csharp
await livestreamApi.RequestClosureAsync();
```

Deepgram will finish processing the audio and return the final transcription. You can also close the livestream by disposing the [`DeepgramLivestreamApi`](src/DeepgramLivestreamApi.cs) object.
Deepgram will finish processing the audio and return the final transcription. You can also close the livestream by disposing the [`DeepgramLivestreamApi`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramLivestreamApi.cs) object.
6 changes: 3 additions & 3 deletions docs/tutorials/prerecorded-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ The pre-recorded API allows you to transcribe audio files that are stored on the

1. **Initialize the Deepgram Client**

You'll need to initialize the [`DeepgramClient`]("src/DeepgramClient.cs") with your API key. If desired, you can provide your own custom logger which will be helpful for debugging. By default, all clients use a `NullLogger`. Here's how you can do it:
You'll need to initialize the [`DeepgramClient`]("https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramClient.cs") with your API key. If desired, you can provide your own custom logger which will be helpful for debugging. By default, all clients use a `NullLogger`. Here's how you can do it:

```csharp
var client = new DeepgramClient("your-api-key", myCustomLogger);
```

2. **Use the Pre-recorded API**

Now you can use the [`DeepgramPrerecordedApi`](src/DeepgramPrerecordedApi.cs) class to interact with the pre-recorded API. As with all other API methods, use can pass a cancellation token to the method to cancel the operation. Here's an example of how you can do this:
Now you can use the [`DeepgramPrerecordedApi`](https://github.com/OoLunar/DeepgramSharp/blob/master/src/DeepgramPrerecordedApi.cs) class to interact with the pre-recorded API. As with all other API methods, use can pass a cancellation token to the method to cancel the operation. Here's an example of how you can do this:
```csharp
var result = await client.PreRecordedApi.TranscribeAsync("url-to-your-audio-file", myCancellationToken);
Expand Down Expand Up @@ -40,7 +40,7 @@ The pre-recorded API allows you to transcribe audio files that are stored on the

4. **Handle the Result**

The `Transcribe` method returns a nullable [`DeepgramTranscription`](src/Entities/DeepgramTranscription.cs) object. The transcription will contain metadata about the model used, the same amount of audio channels as the input data and most importantly, the recorded text. Here's an example of how you can handle the result:
The `Transcribe` method returns a nullable [`DeepgramTranscription`](https://github.com/OoLunar/DeepgramSharp/blob/master/Entities/DeepgramTranscription.cs) object. The transcription will contain metadata about the model used, the same amount of audio channels as the input data and most importantly, the recorded text. Here's an example of how you can handle the result:
```csharp
if (result is not null)
Expand Down

0 comments on commit e56a921

Please sign in to comment.