Giter VIP home page Giter VIP logo

Comments (9)

chausner-audeering avatar chausner-audeering commented on May 30, 2024

There is a cFFmpegSource component but it only supports input from a file. If you want to use FFmpeg for live audio recording, you will need to do the recording outside of openSMILE and pass the data via SMILEapi and cExternalAudioSource to openSMILE. For more information, see https://audeering.github.io/opensmile/reference.html#smileapi-c-api-and-wrappers.

from opensmile.

aniketzz avatar aniketzz commented on May 30, 2024

Can you please elaborate? I am getting some trouble understanding where and what to change.
For example: when I looked at SMILEapi, I did not understand where the input was coming from.
How do I call cExternalAudioSource? For using local device microphone I am using the below code in config:

[waveIn:cPortaudioSource]
writer.dmLevel=wave
monoMixdown = 0
 ; -1 is the default device, set listDevices=1 to see a device list
device = -1
listDevices = 0
sampleRate = 16000
 ; if your soundcard only supports stereo (2-channel) recording, 
 ; use channels=2 and set monoMixdown=1
channels = 1
nBits = 16
audioBuffersize_sec = 0.050000
buffersize_sec=2.0

from opensmile.

chausner-audeering avatar chausner-audeering commented on May 30, 2024

Documentation on SMILEapi is unfortunately rather sparse. Basically, it boils down to:

  • Replacing cPortaudioSource in the config with cExternalAudioInput
  • Using SMILEapi to load and run the config file
  • Passing audio data via SMILEapi to the cExternalAudioInput component

SMILEapi is a C API for maximum compatibility with other languages. openSMILE includes a Python wrapper which is recommended if you are working in Python.

You might also want to take a look at the implementation of https://github.com/audeering/opensmile-python which under the hood uses SMILEapi via the Python wrapper.

from opensmile.

aniketzz avatar aniketzz commented on May 30, 2024

Is there any way to get the data per frameTime in realtime for prosody, mfcc and egemaps in opensmile?
I am able to configure the API to generate the features for prosody, mfcc and egemaps.
The current input is a file. How do I get the features in realtime using the API? currently, it generated the data as a series in one go.

Also, What will be the way to use ffmpeg with the api? I see that I have to pass the data(audio file) generated by ffmpeg or can I stream data via ffmpeg and pass it.

from opensmile.

chausner-audeering avatar chausner-audeering commented on May 30, 2024

When using SMILEapi in combination with eExternalSink, you will get the features in real-time as soon as they are generated.

Also, What will be the way to use ffmpeg with the api?

You can stream audio in real-time from FFmpeg to openSMILE. You'll need to set up the audio recording with FFmpeg, and then pass each individual buffer of audio received from FFmpeg to openSMILE via the SMILEapi function smile_extaudiosource_write_data.

from opensmile.

aniketzz avatar aniketzz commented on May 30, 2024

What will be the way to use FFmpeg with the python API?
How do I get the features in real-time using the python API?
I have changed the config to:

[waveIn:cFFmpegSource]
writer.dmLevel = wave
blocksize_sec = 1.0
filename = \cm[inputfile(I){test.wav}:name of input file]
monoMixdown = 1.0
outFieldName = pcm
However, it takes input from a file but I want to take input from a port.
For example, I'll be sending an audio file through 8000 port and I want to pass this input to the open smile python API

from opensmile.

chausner-audeering avatar chausner-audeering commented on May 30, 2024

cFFmpegSource only supports input from files. If you need to receive an audio stream via the network and you want to decode it using FFmpeg, I suggest to ask in the FFmpeg forums or maybe StackOverflow for help. I can help you with passing the audio via the SMILEapi interface to openSMILE.

To get started with SMILEapi, see the API definition and comments in https://github.com/audeering/opensmile/blob/master/progsrc/smileapi/python/opensmile/SMILEapi.py. See also the help in the openSMILE documentation on components cExternalAudioSource and cExternalSink.

from opensmile.

aniketzz avatar aniketzz commented on May 30, 2024

We have ffmpeg command ready to decode the audio which is coming from the UDP port, but How do we integrate the command into the opensmile python API?

from opensmile.

aniketzz avatar aniketzz commented on May 30, 2024

We have ffmpeg command ready to decode the audio which is coming from the UDP port, but How do we integrate the command into the opensmile python API?

can anyone help me with the above query?

from opensmile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.