How to play audio on python without saving an audio file - machine-learning

I am working with Tensorflow_TTS. I am generating audio using fastspeech and melgan. Now this audio is an eager tensor, more precisely: <class 'tensorflow.python.framework.ops.EagerTensor'> . I want to play this audio tensor in the script without converting it to an audio file and then playing it. Is there any way to do this?

Noob that I am I just figured it out, using the sounddevice library in python I was able to play the audio without saving it by converting the eagertensor to a numpy array.

Related

how to encode numerous obj/ply file to 360° ar video for playing on vr device Quest2

for example, i have already processed ply/obj file with corresponding frame. How could I covert all these files to a volumetric video and play on Quest2
Blender:https://github.com/neverhood311/Stop-motion-OBJ
Unity/Unreal enginer by ef-eve:https://ef-eve.com/help-center/unity/
I have tried to use following project but it only can import but can't export to video

Speech Recongnition Using OpenVINO

I want to implement a python project in which the input will be a .mp4 file and the output will be the transcript or subtitle of the video. The constraint is to use OpenVINO. How can I do that?
mp4 is a container. I believe the current OpenVINO speech demo/samples use wav files as that is what the model is trained for.
If you can convert your mp3 or audio from the mp4 container using a tool to convert it to the wav format, that may work.
speech rec demo

How to save a file applied audio filters with The Amazing Audio Engine?

I'm using TAAE, to apply filters on an Audio file, this seems to be work. But now, how can I save that audio file.

Can I extract or convert a video file to audio?

I have a case where i need to get audio out from video file. Is this possible in iOS ??
I need only the output file as an audio any type. I have the video file in my documents directory which I record earlier in application.
1.Convert Video Reverse
2.Extract audio from a video file
3.Add Audio & Video Together
Download Code From Here
may be helpful to you.
Yes, it can be done. See Extract audio from video file for ideas.
Extracting is probably the more accurate term.

How to copy audio stream using FFMpeg API ( not a command line tool )

I'm developing some Video Editing Apps on Android.
the objective of the app is "Editing Videos on Android".
and...
I'm just completed making video file using some images.
but.. I can't attach audio into the video.
my method is same as follows.
1.VideoStream, audio stream creation using AVFormatContext
2.Movie encoding in video stream was successful
3.Encode codec open in audio stream was successful
4.Set sample format to AV_SAMPLE_FMT_FLTP
5.Sample rate and channel was set same as source audio
6.Choose appropriate Decoder and read packet
7.Convert packets using swr_converter, setting same as sample format
8.Encode converted data
9.memory deallocation
10.END!
Problem is here:
Video of finally created video file was normally played. but the Audio wasn't.
It heared like weird. It have many noises and plays slowly.
I've googled with many keywords but they only say about "FFmpeg command line usage".
I wanna make with FFMpeg API. not a Command line tool.
Please help.
Your question is vague without some kind of code to go along with it, as trust me there are a lot of things that can go wrong when using ffmpeg's libraries directly (and on Windows there is no debuging). Unfortunately ffmpeg's libraries are not well documented so it is generally best to read the source code for ffmpeg in order to use its libraries. Find the equivalent command line options to perform what you want and track that through ffmpeg's source to see the library calls.

Resources