Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help with AI text to speech

Hello you all, I am working on a project I have in mind and I am looking for good ways of getting answers for my input through text to speech so for example you make an input and the voice answers you for testing it would be enough to just get the input as output, I have looked through some libraries but they all sound so extremely robotic, i am looking for something sounding natural or where i can customize the voice completely to my liking, I have tested pyttsx3 but it wasnt really for me, because of said reasons


I would love to hear your ideas! :)
The risk of not taking risk is riskier than comfort.

Never Deal Off-Site!
you can try elevenlabs.io seems as what you looking for they have api and the basic use is free
https://elevenlabs.io/docs/quickstart
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Oct 4, 2025 09:25 AM)HerrWinston Wrote:  Hello you all, I am working on a project I have in mind and I am looking for good ways of getting answers for my input through text to speech so for example you make an input and the voice answers you for testing it would be enough to just get the input as output, I have looked through some libraries but they all sound so extremely robotic, i am looking for something sounding natural or where i can customize the voice completely to my liking, I have tested pyttsx3 but it wasnt really for me, because of said reasons


I would love to hear your ideas! :)

I like what you're doing, my friend.I'll give you a basic example of when I was thinking about things like you.you have various engines you can use but if you want to learn and make custom you can try this :P

TTS libraries sounding robotic simple answer why not use your own voice :P

simple example:

Code
using System;
using System.Collections.Generic;
using System.IO;
using NAudio.Wave;

class Program
{
    static void Main()
    {
        var wordToWavMap = new Dictionary<string, string>
        {
            { "hello", "hello.wav" },
            { "world", "world.wav" }
            // Add more words as needed
        };

        Console.WriteLine("Enter a sentence:");
        string input = Console.ReadLine().ToLower();

        foreach (var word in input.Split(' '))
        {
            if (wordToWavMap.TryGetValue(word, out var wavFile))
            {
                PlayWav(wavFile);
            }
            else
            {
                Console.WriteLine($"Word '{word}' not recognized.");
            }
        }
    }

    static void PlayWav(string wavFile)
    {
        if (!File.Exists(wavFile))
        {
            Console.WriteLine($"WAV file '{wavFile}' not found.");
            return;
        }

        try
        {
            using var audioFile = new AudioFileReader(wavFile);
            using var outputDevice = new WaveOutEvent();
            outputDevice.Init(audioFile);
            outputDevice.Play();

            while (outputDevice.PlaybackState == PlaybackState.Playing)
            {
                System.Threading.Thread.Sleep(100);
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error playing '{wavFile}': {ex.Message}");
        }
    }
}

But for example by using NAudio, you can actually build your own "custom TTS engine" with some limitations.The idea is simple: instead of using robotic prebuilt TTS libraries, you record your own voice (or a set of voices) saying all the words or phonemes you need, and then play them back dynamically.But this is just thinking outside the box,but with the right implementation of NAudio you can do really great things and you will actually have absolutely complete control, volume,sleed etc etc...

I hope this was informative. <3
buy me a coffee eth:0x88621A52aa5Eb3b6503628369687111810186c58
i use tts and stt a lot

you can use faster whisper and piper.
https://github.com/SYSTRAN/faster-whisper
https://github.com/rhasspy/piper


use use the google tts python api.
Why does everyone freak out when you say you have a plan to save the world instead of listening.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Mr. RobotMay 3, 2023 01:07 PM 2 143 May 3, 2023 01:07 PM
Last Post: javierpena
by BlackVikingProSep 25, 2016 03:17 PM 0 103 Sep 25, 2016 03:17 PM
Last Post: BlackVikingPro
by arlingtonAug 23, 2016 09:26 AM 4 177 Aug 23, 2016 09:26 AM
Last Post: arlington