Flite doesn't produce speech without creating a .WAV file? - c

I am trying to run flite TTS for a project, and I encountering an issue where there's no output sound when I run this command.
flite -t hello
But, when I run this command, it creates a .wav file and I can play it.
flite -t hello -o hello.wav
I managed to compile with the correct libraries and downloaded the required voice files {source code} so there are no issues there, and after looking in Stackoverflow I found a few questions posted about this{link}, but none of them works with mine. Also, I tried running the sample C code given in the flite's documentation {doc}, but that doesn't produce any output speech either.
//extracted from the sample code
flite_file_to_speech(argv[1],v,"play");
Could anyone suggest me a way to generate the speech with flite, without creating a .wav file?

Related

How can I compile a C console program using Cairo library (that compiles ok on Ubuntu) on Windows 11?

I made a console C program that reads a .obj 3d model and unflatten it into a multipage PDF. At first I used a little PDF library (https://github.com/AndreRenaud/PDFGen) that worked fine and I was able to compile my code on Windows 11, but I needed to have text rotated and it wasn't possible with PDFGen, so I changed for Cairo Library (https://github.com/freedesktop/cairo). With Cairo my code does exactly what I want, but I didn't find how to compile it on Windows.
I'm using Geany to edit/compile my C code, my build command is :
gcc -Wall -o "%e" "%f" -lcairo -lm
I tried to do the same on Geany on Windows and it didn't work.
I found a repository with standalone cairo DLL for Windows, but didn't manage to use it.
I'm looking for another PDF library that could be used both on Linux and Windows, but for the moment didn't find any.
my code is here (https://github.com/gilboonet/Deplieur-C/blob/main/deplieur.c)
It's my first post here, I'm a long time C programmer but not IT pro and I'm not a Windows user, I only want to compile my code on it because lots of people that will use my program are windows users. Thank you.
I've found a project called "cairo-windows" on Github that creates resources needed to build a C project using Cairo, and it works, even if I needed to use Visual Studio. Sadly, it seems to have problem with pdf creation that only creates a blank file. To make it work I changed the resources (dll and includes) it needs to build the project to those from my gtk windows build it comes with Cairo 1.16.0. If you want to do the same, you must replace the extern directory from cairo-windows (initially fetched by setup-win32.py): lib by cairo.lib, cairo.dll expat.dll fontconfig-1.dll freetype-6.dll and libpng16.dll from your gtk build (..gtk\x64\release\bin) and include by the content of ..\gtk\x64\include.

How can I use Xcode to compile a C program so I can use the binary in the sandbox?

I have a Cocoa app that runs a binary executable I include with the project, unless I turn sandboxing on. I want sandboxing on, so I need a way to authorize the running of this program. I have the source code - this binary executable is part of a big package which comes with a shell script for making the software along with a bunch of other programs. It compiles successfully using this script on my Mac.
I found another post on stackoverflow where it was suggested that the C code can be compiled within XCode along with the rest of the app and it will be allowed to execute that way.
Is that true? I would like to compile the C code as part of my app and run the binary executable it creates.
I got it.
As suggested by trojanfoe, codesigning worked.
codesign -s "Me" theBinary
the problem was my Swift line,
Bundle.main.url(forAuxiliaryExecutable: "theBinary")
I changed it to,
Bundle.main.url(forResource: "theBinary", withExtension: nil)
and now it works. Alright! Only cost me $99.

flash arduino micro using code::blocks and avr-dude

The program I am trying to compile for my arduino micro does not compile in the 'standard' arduino IDE. The reason is subject to a completely different topic discussed at the arduino forum. Cut a long story short, I write pure C and the arduino GUI only does C++. Trust me, I have tried to tweak the interface so it would use avr-gcc, but you enter in an infinite compile - error - refactor loop. I need an other solution.
I am using code::blocks as IDE and want to flash the avr-gcc compiled code onto the arduino micro board using avr-dude on linux kubuntu machine. How would one achieve this?
Problem is I have been running in circles for quite some time now trying to find the correct command line arguments or code:blocks post compiler settings. All information out there is either very old or irrelevant.
I'll keep you posted if I find relevant info
avrdude -V -F -C <avrdude.conf> -p <processor> -P <tty-port> -c stk500v1 -b <baud-rate> -U flash:w:<your-application>.hex
An easy way to see all the settings and get a suitable command line for your system is to use the Arduino gui. Enable verbose upload in the preferences, then program in a basic program like blink. Copy/paste that command line and change the hex file.
I did it here
here
body 24262830

how to build a .c file in sublime text 3

i just started learning c. i want to learn doing it in sublime text unlike any IDE. so when i tried to build my .c file in sbt3, i am receiving the following error
clang: error: no input files
[Finished in 0.0s with exit code 1]
[shell_cmd: g++ "" -o "/"]
[dir: /Applications/Sublime Text.app/Contents/MacOS]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
i have no idea what that is. i am a newbie to everything.i have tried some solutions that i found online like creating a new build system. but it ain't helping. Could someone help me with what's going on here?
You need to link to a gist of your build-file.
You can see also this question. It is for sublime text 2, but I think it should cover you.

About linking files using Mac terminal

Okay here goes, I'm completely new at this, started learning the terminal just about 2 days ago. I'm slowly but surely getting the hang of it, now I'm stuck on this and I've been trying to fix it for a good hour. It's a rather simple question as I am a newby.
I have a C file in my desktop and a Header file in a folder in my desktop. I'm including that header in my C file. I have to link them (currently doing a tutorial, it tells me to link, but doesn't show me how).
You have a couple of options. First, you will need to install the software development environment - it's called Xcode. I think you can get it for free on the AppStore, if not Google it.
Then you need to decide if you want to develop and compile graphically in the Xcode Integrated Development Environment. If you do, start Xcode and create a new project and open your C file and change the "include path" to match the location of your header file. Then click "Build" and "Run"
If you want to do things at the commandline, you'll need to install "Xcode Command Line Tools" - Google it. That will give you a compiler. Then you can compile. I'm not certain which compiler you will get - it could be "llvm" or "gcc" or something else, but the command you are looking for will be something like:
gcc -o prog -I /path/to/HeaderFileFolder yoursourcecode.c
which will give you a program called "prog" that you can run by typing
./prog
You are likely confusing two different concepts. The "link" mentioned in the tutorial is probably talking about turning the compiled objects into a single executable. See http://www.cprogramming.com/compilingandlinking.html for an explanation of what linking means in this context.
What you've provided examples of doing is file system linking, which is totally unrelated.
Providing more details on the tutorial could help refine this answer.

Resources