From e56a9210f6abd76742b02c0bd3bc2287524657e1 Mon Sep 17 00:00:00 2001 From: Lunar Starstrum Date: Wed, 27 Dec 2023 19:48:09 -0600 Subject: [PATCH] Fix hyperlinks --- .gitignore | 3 ++- Directory.Build.props | 2 +- README.md | 6 +++--- docs/toc.yml | 2 ++ docs/tutorials/live-api.md | 10 +++++----- docs/tutorials/prerecorded-api.md | 6 +++--- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 4cc80ff..6ad03e4 100644 --- a/.gitignore +++ b/.gitignore @@ -482,4 +482,5 @@ $RECYCLE.BIN/ # content below from: OoLunar .env logs/ -res/config.debug.json \ No newline at end of file +res/config.debug.json +docs/_site \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index d2fa4cd..94db6cc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,9 +8,9 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "DeepgramSharp.sln")) true net8.0 + 1.2.0 $(Version)-nightly-$(Nightly) $(Version)-pr-$(PR) - 1.1.0 diff --git a/README.md b/README.md index 6f2d228..ee14583 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docs/toc.yml b/docs/toc.yml index 41799dc..a29f4b1 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1,3 +1,5 @@ +- name: Home + href: index.md - name: Api Documentation href: api/ homepage: api/index.md diff --git a/docs/tutorials/live-api.md b/docs/tutorials/live-api.md index 9f9671c..c0cdb78 100644 --- a/docs/tutorials/live-api.md +++ b/docs/tutorials/live-api.md @@ -4,7 +4,7 @@ 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); @@ -12,7 +12,7 @@ The livestream API allows you to transcribe audio streams in real-time. You can 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() @@ -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() @@ -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. \ No newline at end of file + 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. \ No newline at end of file diff --git a/docs/tutorials/prerecorded-api.md b/docs/tutorials/prerecorded-api.md index 1028f51..7109612 100644 --- a/docs/tutorials/prerecorded-api.md +++ b/docs/tutorials/prerecorded-api.md @@ -4,7 +4,7 @@ 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); @@ -12,7 +12,7 @@ The pre-recorded API allows you to transcribe audio files that are stored on the 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); @@ -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)