Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample TTS clips in README.md #38

Merged
merged 7 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions NeMoOnnxSharp.Example/ModelDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private async Task DownloadAsync(
using (var response = await _httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken))
{
response.EnsureSuccessStatusCode();
long currentPosition = 0;
long? contentLength = response.Content.Headers.ContentLength;
using (var reader = await response.Content.ReadAsStreamAsync(cancellationToken))
{
Expand All @@ -102,11 +103,12 @@ private async Task DownloadAsync(
while ((bytesRead = await reader.ReadAsync(buffer, 0, buffer.Length, cancellationToken)) != 0)
{
await writer.WriteAsync(buffer, 0, bytesRead, cancellationToken);
currentPosition += bytesRead;
var currentDateTime = DateTime.UtcNow;
if ((lastDateTime - currentDateTime).Seconds >= 1)
if ((currentDateTime - lastDateTime).Seconds >= 1)
{
lastDateTime = currentDateTime;
ShowProgress(reader.Position, contentLength);
ShowProgress(currentPosition, contentLength);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion NeMoOnnxSharp.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using NeMoOnnxSharp.Models;
using System.Reflection;

namespace NeMoOnnxSharp.Example
{
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ Name | Target | Predicted
61-70968-0061.wav|you are a worthy leech will presently whispered robin the wine has worked a marvel|you are a worthy leech will presently whispered robin the wine has worked a marvel
61-70968-0062.wav|ay and show you some pretty tricks|i enshow you some pretty tricks

## Text-to-speech samples

NeMoOnnxSharp supports text-to-speech with FastSpeech and HiFiGAN.

Generated | Target
--- | ---
[generated-61-70968-0000.wav](https://github.com/kaiidams/NeMoOnnxSharp/releases/download/v1.3/generated-61-70968-0000.wav)|he began a confused complaint against the wizard who had vanished behind the curtain on the left
[generated-61-70968-0001.wav](https://github.com/kaiidams/NeMoOnnxSharp/releases/download/v1.3/generated-61-70968-0001.wav)|give not so earnest a mind to these mummeries child
[generated-61-70968-0002.wav](https://github.com/kaiidams/NeMoOnnxSharp/releases/download/v1.3/generated-61-70968-0002.wav)|a golden fortune and a happy life

## Exporting ONNX

Exported ONNX file is included in this repository. But if you want to do it yourself,
Expand Down
7 changes: 6 additions & 1 deletion test_data/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Test data

These file are from [LibriSpeech](http://www.openslr.org/12)
These files are from [LibriSpeech](http://www.openslr.org/12)

- `transcript.txt`
- `61-70968-0052.wav`
- ...

This file is from [NVIDIA NeMo tutorial](https://github.com/NVIDIA/NeMo/blob/main/tutorials/asr/Online_Offline_Speech_Commands_Demo.ipynb)

- `SpeechCommands_demo.wav`

This file is from [Thrsten Voice](https://github.com/thorstenMueller/Thorsten-Voice)

- `samples_thorsten-21.06-emotional_neutral.wav`