Pular para o conteúdo

Um modelo turco de síntese de fala de 34 MB: testei no meu laptop

Ver no idioma original →

Autoria: Prompt Engineer 48 · Assistir no YouTube

Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.

Idioma original: inglês

Vídeo original: A 34 MB Turkish Text-to-Speech Model: I Tested It on My Laptop · Canal: Prompt Engineer 48 · 12:10 · Assistir no YouTube

Tópicos: Avaliação e benchmarks de IA, Inferência e otimização de modelos, Modelos locais e open source, Modelos multimodais

O vídeo testa o EMA Lightning, um modelo de síntese de fala em turco com 8,6 milhões de parâmetros e cerca de 34 MB de pesos. No laptop do apresentador, ele gerou áudio entre 4,9 e 12,4 vezes mais rápido que o tempo real na CPU e 95 vezes mais rápido na GPU RTX 4060. O modo de streaming entregou o primeiro trecho de áudio em 0,13 segundo, mas a compilação do modo lightning não funcionou no Windows durante o teste. O modelo tem uma única voz, não oferece clonagem de voz nem controle de emoção e é voltado exclusivamente ao turco.

  • O EMA Lightning é um modelo de síntese de fala em turco com 8,6 milhões de parâmetros; seus arquivos de pesos somam cerca de 34 MB.
  • O modelo foi testado localmente e gerou fala de 4,9 a 12,4 vezes mais rápido que o tempo real na CPU.
  • Na GPU RTX 4060 do laptop, o áudio foi gerado a 95 vezes a velocidade do tempo real usando PyTorch sem compilação.
  • A compilação do modo lightning não terminou no Windows após cinco minutos; o apresentador não conseguiu reproduzir o resultado de 440 vezes o tempo real citado na página do modelo.
  • No modo de streaming, o primeiro trecho chegou em 0,13 segundo; o parágrafo completo foi produzido em seis trechos.
  • A API pode retornar os tempos de início e fim de cada palavra, o que permite criar legendas ou karaokê.
  • A mesma seed reproduziu arquivos de áudio idênticos, enquanto uma seed diferente produziu outro arquivo.
  • O modelo tem uma única voz, não oferece clonagem de voz nem controle de emoção e só funciona com texto em turco.
  • Os números de taxa de erro de palavras e qualidade citados são dos autores; o apresentador não os verificou por conta própria.
Início Capítulo Resumo
00:01 Apresentação do EMA Lightning e dos resultados publicados O apresentador apresenta o modelo, seus arquivos, parâmetros, licença e os benchmarks divulgados pelos autores.
03:36 Instalação e testes de síntese na CPU Após mostrar a demonstração web e a configuração em Python, o apresentador testa frases curtas e longas na CPU.
06:58 Desempenho na GPU e tentativa de compilação O teste na RTX 4060 alcança 95 vezes o tempo real, mas a compilação do modo lightning não funciona no Windows.
09:01 Streaming, alinhamento por palavra, velocidade e seed O vídeo demonstra a chegada rápida do primeiro trecho, os tempos por palavra e os efeitos das opções de velocidade e seed.
10:36 Resultados, limitações e conclusão O apresentador resume o que conseguiu reproduzir, distingue seus testes dos números dos autores e descreve as limitações do modelo.

Um modelo de síntese de fala em turco que tem apenas 34 megabytes. — 00:01

A média foi de 0,14 segundo por chamada, ou 95 vezes o tempo real. — 06:58

O modo normal já é 95 vezes mais rápido que o tempo real aqui. — 08:00

O que não funcionou para mim foi a compilação do lightning no Windows. — 10:36

  • EMA-lightning (modelo): Modelo de síntese de fala em turco testado no vídeo, com 8,6 milhões de parâmetros.
  • Canberk Aslan (pessoa): Autor associado ao EMA-lightning no Hugging Face.
  • Canberk7/EMA-lightning (repo): Repositório no GitHub do projeto EMA-lightning.
  • Hugging Face (empresa): Plataforma onde estão a página do modelo e uma demonstração web do EMA-lightning.
  • PyTorch (ferramenta): Framework usado para executar o modelo, tanto na CPU quanto na GPU.
  • Triton (ferramenta): Dependência de compilação mencionada na tentativa de ativar o modo lightning no Windows.
  • DMD2 (conceito): Método de destilação citado como motivo para o gerador usar quatro etapas de amostragem.
  • Whisper (modelo): Modelo usado pelos autores para calcular a taxa de erro de palavras reportada.
  • normalizer-tr (ferramenta): Componente de pré-processamento que normaliza números, datas, horários, valores, unidades e abreviações.
  • Apache License 2.0 (conceito): Licença indicada para os pesos e o código do projeto, permitindo uso comercial conforme a página do modelo.

00:01 Certo. Neste vídeo, vamos ver um modelo turco de conversão de texto em fala que tem apenas 34 megabytes. E você pode ver aqui que ele transformou um parágrafo em turco de 13 segundos em áudio em cerca de 1 segundo e meio na CPU. Vale lembrar que tudo aqui está sendo executado no meu sistema local, este laptop com uma RTX 4060 e 8 GB de memória. Vamos testar. Ele se chama EMA lightning e está no Hugging Face, publicado por Canberk Aslan com o nome EMA-lightning. É um

00:32 modelo de conversão de texto em fala apenas para turco. Se você olhar os arquivos, há apenas dois arquivos de pesos. EMA.pt tem 22,3 megabytes e decoder.pt tem 12,1 megabytes, e o repo inteiro tem 36,9 megabytes. O model card diz que o modelo acústico tem 5,6 milhões de parâmetros. É um DIT, e o vocoder tem 3 milhões de parâmetros, o que dá 8,6 milhões no total. O vocoder produz áudio de 48 kHz, e o gerador funciona com quatro etapas de amostragem porque foi destilado com algo

01:02 chamado DMD2. Então, ele não precisa de dezenas de etapas como um modelo de difusão normal. A licença é Apache 2.0 tanto para os pesos quanto para o código. Portanto, o uso comercial é permitido. É o que diz o model card. Então, confira por conta própria antes de lançar qualquer coisa. Agora, olhando a tabela de benchmark, eles testam o modelo com 495 frases em turco do Freya TR Eval, e a taxa de erro de palavras relatada é de 0,92%. Na mesma tabela, o Trendyol TTS, que tem 2,38 bilhões de parâmetros, fica em 0,98

01:33 e o Eleven Labs V4 fica em 1,43. Vale lembrar que esses são os números dos autores, e a taxa de erro de palavras é avaliada pelo Whisper. Então, alguns dos erros contabilizados podem ser erros do Whisper, e não das vozes. Vamos testar por conta própria o que pudermos. A página que acabamos de ver no Hugging Face é o model card. O repo principal está no GitHub, em Canberk7/EMA-lightning. Se você olhar aqui, ele tem 158 estrelas, 23 forks, cinco tags e 15 commits. E o commit mais recente é um pull request mesclado que

02:03 corrige a forma como a primeira janela de um fluxo é decodificada na CPU. Na lista de arquivos, há src_ema_lightning para o pacote, testes, exemplos, uma pasta benches com os scripts de benchmark, uma pasta docs, um changelog e um arquivo chamado performance.md. É desse último arquivo que vêm os números de velocidade do model card. Em performance.md, a taxa de erro de palavras é obtida com o Whisper large V3, numa faixa de 8 kHz, usando três seeds; o intervalo fica entre 0,79% e 1,05%.

02:34 Os números de velocidade foram medidos numa RTX 4090, em três passagens após o aquecimento. Então, as alegações vêm acompanhadas de uma metodologia, e por isso pude comparar com meu laptop. No changelog, a versão 1.0.4 faz os pesos serem carregados com weights_only igual a true, de modo que um checkpoint só possa conter tensores e não possa executar código ao ser carregado. E a versão 1.0.3 adicionou speech.words, que vou mostrar daqui a pouco. A página do PyPI está na versão 1.0.4, lançada em 8 de outubro. Ela tem links para o repo do GitHub, para o modelo no Hugging

03:06 Face e para um pacote chamado normalizer-tr. Esse é o frontend de texto. Segundo o model card, ele processa números, datas, horários, valores monetários, unidades e abreviações permitidas antes que o modelo os receba. De volta ao Hugging Face, a aba de arquivos mostra 17 commits, e o modelo tem 323 curtidas. Na página do autor, Canberk Aslan tem dois modelos: este e um mais antigo chamado ema-tts. Também há um Space, que é uma demonstração na web. O Space oficial se chama EMA

03:36 lightning Turkish text-to-speech. Você digita um texto em turco, clica em gerar fala e há opções de velocidade, seed e taxa de amostragem. São as mesmas que usamos no código. Ele roda sem GPU, então você pode experimentar sem instalar nada. Não vou digitar nada nele neste vídeo, mas o link está na descrição. A configuração é bem simples. Criei um ambiente virtual novo e depois executei pip install e main lightning. A versão que obtive é a 1.0.4. Uma coisa a observar: a instalação simples trouxe a versão de CPU do PyTorch para mim. Tudo bem para o primeiro teste.

04:08 Mais tarde, vou trocá-la pela versão CUDA para executar na GPU. Para usar o modelo, você pode importar EMA de e main lightning, criar um objeto EMA e chamar dot say com seu texto. Estou passando device igual a CPU. Se olhar a assinatura, say recebe texto, velocidade, uma seed, uma taxa de amostragem e um caminho onde salva o arquivo wave. A taxa de amostragem padrão é 48.000. Vamos executar meu primeiro teste. O texto é curto: uma saudação e um comentário sobre o tempo.

04:39 O primeiro carregamento levou 10,2 segundos na minha máquina; os carregamentos seguintes levam cerca de 1 segundo e meio. Esse clipe tem 2,52 segundos de áudio. Levou 0,27 segundo para gerar, ou seja, cerca de nove vezes mais rápido que o tempo real na CPU, sem nenhuma GPU. Agora, vamos dificultar o teste. Escrevi uma frase com uma data, um horário e um preço.

05:10 Esse áudio tem 7,32 segundos e foi gerado em 0,59 segundo, ou seja, cerca de 12 vezes o tempo real. Se você fala turco, preste atenção em como ele lê a data e o preço, porque é aí que a conversão de texto em fala costuma falhar. Não sou falante nativo, então deixe sua opinião nos comentários. Agora, um texto longo. É um parágrafo sobre o Bósforo, com 241 caracteres, e a saída tem 13,37 segundos de áudio.

05:56 >> Ele foi gerado em 1,34 segundo na CPU, o que é 9,95 vezes mais rápido que o tempo real. Então, é mais ou menos um parágrafo de um livro em um segundo e meio, num laptop com CPU, usando um modelo de 34 megabytes. Agora, o último teste na CPU é aquele sobre o qual o model card faz um alerta. Ele diz que palavras estrangeiras são lidas segundo as regras ortográficas do turco. Então, escrevi uma frase com as palavras GitHub e YouTube. Esse áudio tem 4,2 segundos, e levamos

06:27 0,86 segundo para gerá-lo; é o mais lento dos quatro, a 4,9 vezes o tempo real. É um clipe curto, então o custo fixo pesa mais. Ouça como GitHub e YouTube são pronunciados e você perceberá se a regra ortográfica turca atrapalha. Então, nesses quatro testes na CPU, você pode ver que a velocidade ficou entre 4,9 e 12,4 vezes o tempo real. O model card diz cerca de seis vezes na CPU, e meus números estão na mesma faixa num laptop de 16 núcleos.

06:58 Agora, para a GPU, a primeira coisa que fiz foi substituir o PyTorch para CPU pela versão CUDA. Usei aquele wheel CU128, e agora torch.cuda.is_available imprime true. Estou usando o mesmo parágrafo sobre o Bósforo, com 13,37 segundos de áudio, cinco vezes depois de uma chamada de aquecimento, e calculando a média. A média foi de 0,14 segundo por chamada, o que corresponde a 95 vezes o tempo real numa GPU RTX 4060 de laptop. Aqui está o ponto que vale notar. O model card diz que o PyTorch simples atinge 87 vezes o tempo real

07:29 numa RTX 4090. A GPU do meu laptop chegou a 95, então, para um modelo tão pequeno, a própria GPU não é o gargalo, e uma 4060 é suficiente. O número de 440 vezes o tempo real no model card é para o caminho compilado, e não consegui reproduzi-lo. Então, vou mostrar o que aconteceu. O model card diz para chamar {dot} lightning no modelo para ativar o caminho rápido. No Windows, na primeira vez que chamei esse método, o PyTorch reclamou que não conseguia encontrar uma instalação funcional do Triton e registrou os grafos sem compilar. Então, eu

08:00 instalei o pacote Triton para Windows e executei de novo. Dessa vez, ele começou a compilar; deixei rodando por 5 minutos, mas não terminou. Parei por aí. Então, não posso dizer qual seria o número do lightning neste laptop. Pode funcionar no Linux, talvez precise das ferramentas de build do Visual Studio ou simplesmente de mais tempo. Se você conseguiu fazê-lo funcionar no Windows, conte como nos comentários. O que posso dizer é que você não precisa disso. O modo simples já está 95 vezes mais rápido que o tempo real aqui. Mais uma coisa sobre a API: existe um método chamado best batch size e, na minha

08:30 placa, ele diz 32. O model card diz que batch 64 chega a 1.316 vezes o tempo real com compilação e a 952 vezes com o PyTorch simples, numa 4090. Não executei no modo batch, então, nesse caso, estou apenas apontando o que diz o model card. Agora, sobre streaming: em vez de say, você chama {dot} stream com o texto, e ele fornece blocos de áudio à medida que são gerados. É isso que você usaria para um assistente de voz quando quer que o áudio comece antes de a frase terminar. Cronometrei na GPU com o mesmo parágrafo sobre o Bósforo. O primeiro bloco

09:01 chegou após 0,13 segundo, e tudo terminou em 0,39 segundo, em seis blocos. O model card diz que o primeiro bloco tem cerca de 1 segundo de áudio, então você ouve a fala cerca de um sétimo de segundo depois de pedir. E isso usando PyTorch puro. Sem compilação, para um chatbot que fala turco, já é rápido o bastante para você não perceber nenhum atraso. O model card também menciona um scheduler chamado playhead para atender várias pessoas ao mesmo tempo. Não testei isso, então não vou afirmar nada a respeito. Agora, speech.words dessa mudança

09:32 no log, cada palavra falada aparece com um início e um fim em segundos, então você pode criar legendas ou um karaokê com isso. Testei com a saudação curta: Merhaba começa em zero e termina em 0,6; depois, ben, emma, bugün, hava, çok e güzel. E a última palavra termina em 2,52 segundos, o que corresponde exatamente à duração do clipe. Os campos de cada palavra são apenas texto, início e fim. Mais duas opções antes do veredito: velocidade. Testei a mesma saudação curta em 0,8, 1,0 e 1,5. O clipe tem 3,12

10:05 segundos, 2,52 segundos e 1,72 segundos. Então, a velocidade altera a duração do áudio, e o model card diz que ela vai de 0,25 a 4. E a seed: gerei a mesma frase duas vezes com seed um, e os dois arquivos wave eram idênticos byte a byte. Verifiquei com um hash MD5. Com seed dois, o arquivo é diferente, mas tem a mesma duração: 2,52 segundos. Então, se você quiser

10:36 gerar a mesma versão de novo, mantenha a seed. Então, vou explicar o que realmente observei, o que funcionou. pip install e a primeira chamada say em um ambiente novo, pesos de 34 megabytes. Na CPU, de 4,9 a 12,4 vezes o tempo real. Na GPU, 95 vezes o tempo real. E o primeiro bloco de streaming em 0,13 segundo. O que não funcionou para mim: a compilação do Lightning no Windows. Não consegui obter um

11:07 número para isso, e não reproduzi as 440 vezes indicadas no model card. O que não verifiquei: a taxa de erro de palavras. Isso exige as 495 frases e uma passagem pelo Whisper, e não fiz isso. Então, 0,92% é o número do autor, não meu. O mesmo vale para a pontuação de qualidade, UT MOS de 3,3, e para o scheduler playhead. E quanto às limitações, o próprio model card as informa. Há uma única voz, não há clonagem de voz nem controle de emoção. É apenas em turco. O model card diz que foi

11:37 treinado com cerca de 1.000 horas de dados internos de um único falante, então você não pode escolher outro falante. Então, neste vídeo vimos como podemos executar o modelo de texto para fala em turco EMA Lightning, com 8,6 milhões de parâmetros, usando pip install e algumas linhas de Python. No meu laptop, ele chegou a 12 vezes o tempo real na CPU e a 95 vezes na RTX 4060. Se você precisa de fala em turco para um app, bot ou ferramenta offline, e uma voz é suficiente, vale a pena experimentar, porque tudo ocupa 34 megabytes e a licença é Apache 2.0.

12:10 Se tiver interesse, pode conferir e experimentar no seu próprio sistema também, e me contar como foi, especialmente se conseguiu fazer o modo Lightning funcionar no Windows. O modelo é o EMA Lightning, de Canberk Aslan, no Hugging Face, e o link está na descrição. Vejo você em outro vídeo. Confira o próximo vídeo.

Transcrição original

[00:01] All right. In this video, we will see a Turkish text-to-speech model that is only 34 megabytes. And you can see here that it turned a 13-second Turkish paragraph into audio in about 1 and 1/2 seconds on the CPU. Now, mind you that everything here is running on my local system, this laptop with an RTX 4060 and 8 GB of memory. Let’s go ahead and test this out. So, this is called EMA lightning and it’s on Hugging Face from Canberk Aslan under the name EMA-lightning. It’s a

[00:32] text-to-speech model for Turkish only. If you look here at the files, there are just two weight files. EMA.pt is 22.3 megabytes and decoder.pt is 12.1 megabytes and the whole repo is 36.9 megabytes. The card says the acoustic model has 5.6 million parameters. It’s a DIT and the vocoder has 3 million parameters, which gives you 8.6 million in total. The vocoder gives you 48 kHz audio and the generator runs in four sampling steps because it was distilled with something

[01:02] called DMD2. So, it doesn’t need dozens of steps like a normal diffusion model. The license is Apache 2.0 for both the weights and the code. So, commercial use is allowed. That’s on the card. So, check it yourself before you ship anything. Now, if you look at the benchmark table, they test it on 495 Turkish sentences from Freya TR Eval and the word error rate they report is 0.92% in the same table. Trendyol TTS, which has 2.38 billion parameters, is at 0.98

[01:33] and Eleven Labs V4 is at 1.43. Mind you, these are the authors’ numbers and the word error rate is scored by Whisper. So, some of the errors counted could be Whisper’s mistakes and not the voices. We’re going to test what we can on our own. The page we just saw on Hugging Face is the model card. The main repo is on GitHub under Canberk7/EMA-lightning. If you look here, it has 158 stars, 23 forks, five tags, and 15 commits. And the latest commit is a merged pull

[02:03] request that fixes how a stream’s first window is decoded on CPU. In the file list, there’s src_ema_lightning for the package, tests, examples, a benches folder with the benchmark scripts, a docs folder, a change log, and a file called performance.md. That last file is where the speed numbers on the card come from. In performance.md, the word error rate is from Whisper large V3 on an 8 kHz band with three seeds, and the range is 0.79 to 1.05%.

[02:34] The speed numbers are on an RTX 4090 three passes after warm-up. So, the claims come with a method, and that is why I could compare my laptop against them. On the change log, version 1.0.4 makes the weights load with weights only equals true, so a checkpoint can only hold tensors and cannot run code when it loads. And version 1.0.3 added speech.words, which I’ll show you in a minute. The PyPI page is version 1.0.4 released on October 8th. It links back to the GitHub repo, to the model on Hugging

[03:06] Face, and to a package called normalizer-tr. That’s the text front end. And per the card, it reads numbers, dates, times, money, units, and abbreviations allowed before the model sees them. Back on Hugging Face, the files tab shows 17 commits, and the model has 323 likes. On the author’s page, Canberk Aslan has two models, this one and an older one called ema-tts. And there is a space, which is a web demo. The official space is called EMA

[03:36] lightning Turkish text-to-speech. You type Turkish text, press generate speech, and it has speed, seed, and sample rate options. The same ones we used in code. It runs on zero GPU, so you can try it without installing anything. I’m not going to type into it in this video, but the link is in the description. Setup is very simple. I made a fresh virtual environment and then pip install e main lightning. The version I got is 1.0.4. One thing to note here, the plain install pulled the CPU build of PyTorch for me. That’s fine for the first test.

[04:08] Later, I’ll swap it to the CUDA build for the GPU run. Now, for using it, what you can do is import EMA from e main lightning, make one EMA object, and call dot say with your text. I’m passing device equals CPU. If you look at the signature, say takes text, speed, a seed, a sample rate, and a path where it saves the wave file. The default sample rate is 48,000. Let’s go ahead and run my first test. The text is a short one, a greeting and a comment about the weather.

[04:39] The first load took 10.2 seconds on my machine and loading again afterwards takes about 1 and 1/2 seconds. That clip is 2.52 seconds of audio. It took 0.27 seconds to generate, so about nine times faster than real time on CPU with no GPU at all. Now, let’s make it harder. I wrote a sentence with a date, a time, and a price.

[05:10] That one is 7.32 seconds of audio generated in 0.59 seconds, so about 12 times real time. If you are Turkish speaker, listen to how it reads the date and the price because that’s where text-to-speech usually breaks. I’m not a native speaker, so put your own opinion in the comments. Next, a long one. It’s a paragraph about the Bosphorus, 241 characters, and the output is 13.37 seconds of audio.

[05:56] >> It was generated in 1.34 seconds on the CPU, which is 9.95 times faster than real time. So, that’s roughly a paragraph of a book in a second and a half on a laptop CPU from a 34 megabyte model. Now, the last CPU test is the one the card warns about. The card says foreign words get read with Turkish spelling rules. So, I wrote a sentence with the words GitHub and YouTube inside it. That one is 4.2 seconds of audio, we

[06:27] 0.86 seconds to generate, and it’s the slowest of the four at 4.9 times real time. It’s a short clip, so the fixed cost shows up more. Listen to how GitHub and YouTube come out, and you’ll hear whether the Turkish spelling rule hurts you. So, across these four CPU runs, you can see the speed is between 4.9 and 12.4 times real time. The card says about six times on CPU, and my numbers are in the same range on a 16-core laptop.

[06:58] Now, for the GPU, the first thing I did was replace the CPU PyTorch with the CUDA build. I used that CU128 wheel, and torch.cuda.is available now prints true. I’m running the same Boss First Paragraph, 13.37 seconds of audio, five times after one warm-up call and averaging. The average was 0.14 seconds per call, which is 95 times real time on an RTX 4060 laptop GPU. Here’s the part worth noticing. The card says plain PyTorch gets 87 times real

[07:29] time on an RTX 4090. My laptop card got 95, so for a model this small, the GPU itself is not the bottleneck, and a 4060 is enough. The 440 times real time number on the card is for the compiled path and that one I could not reproduce. So, let me show you what happened. The card says to call {dot} lightning on the model to turn on the fast path. On Windows, the first time I called it, PyTorch complained that it cannot find a working Triton installation and recorded graphs without compiling. So, I

[08:00] installed the Triton Windows package and ran it again. This time it started compiling and I let it run for 5 minutes and it did not finish. I stopped it there. So, I can’t tell you the lightning number for this laptop. It may work on Linux, it may need the Visual Studio build tools or it may just need more time. If you have it working on Windows, tell me how in the comments. What I can tell you is that you don’t need it. Plain mode is already 95 times real time here. One more thing in the API, there’s a method called best batch size and on my

[08:30] card it says 32. The card says batch 64 reaches 1,316 times real time with compile and 952 with plain PyTorch on a 4090. I did not run batch mode, so I’m just pointing at the card for that one. Now, streaming, instead of say you call {dot} stream with the text and it gives you audio chunks as they’re generated. This is what you’d use for a voice assistant where you want sound to start before the sentence is finished. I timed it on the GPU with the same Bosphorus paragraph. The first chunk

[09:01] arrived after 0.13 seconds and the whole thing finished in 0.39 seconds in six chunks. The card says the first chunk is about 1 second of audio, so you hear speech about a seventh of a second after you ask for it. And that’s with plain PyTorch. No compile for a chatbot that talks Turkish, that’s already fast enough that you wouldn’t notice a delay. The card also mentions a scheduler called playhead for serving multiple callers at once. I haven’t tested that, so I’m not going to claim anything about it. Now, speech {dot} words from that change

[09:32] log, every spoken word comes back with a start and an end in seconds, so you can build captions or karaoke from it. I ran it on the short greeting Merhaba starts at zero and ends at 0.6, then ben, then emma, then bugun, hava, chok, and zilan. And the last word ends at 2.52 seconds, which matches the clip length exactly. The fields on each word are just text, start, and end. Two more options before the verdict speed. I ran the same short greeting at 0.8, 1.0, and 1.5. The clip is 3.12

[10:05] seconds, 2.52 seconds, and 1.72 seconds. So, speed changes the length of the audio and the card says it goes from 0.25 to 4. And seed, I generated the same sentence with seed one twice, and the two wave files are byte for byte identical. I checked with an MD5 hash. With seed two, the file is different, but the length is the same, 2.52 seconds. So, if you want

[10:36] the same take again, keep the seed. So, let me go through what I actually saw, what worked. pip install and the first say call on a fresh environment, 34 megabytes of weights. On CPU, 4.9 to 12.4 times real time. On the GPU, 95 times real time. And the first streaming chunk in 0.13 seconds. What didn’t work for me, the lightning compile on Windows. I couldn’t get a

[11:07] number for it, and the 440 times on the card is not something I reproduced. What I did not check, the word error rate. That takes the 495 sentences and a whisper pass, and I did not run it. So, 0.92% is the author’s number, not mine. Same for the quality score, UT MOS of 3.3 and the playhead scheduler. And the limits, the card states itself. It has one voice, there’s no voice cloning, and no emotion control. It’s Turkish only. The card says it was

[11:37] trained on about 1,000 hours of internal single speaker data, so you can’t pick another speaker. So, in this video we have seen how we can run EMA Lightning at Turkish text-to-speech model of 8.6 million parameters with pip install and a few lines of Python. On my laptop, it ran at up to 12 times real time on the CPU and 95 times on the RTX 4060. If you need Turkish speech for an app, uh bot, or an offline tool, and one voice is enough, this is worth trying because the whole thing is uh 34 megabytes and the license is Apache 2.0.

[12:10] If you’re interested, you can go ahead and check this out and try this out on your own system as well, and let me know how it goes, especially if you got the lightning mode working on Windows. The model is EMA Lightning by Canberk Aslan on Hugging Face, and the link is in the description. I’ll see you in another one. Check out the next video.