# audio to video

## Component/part description

This module is used to convert audio or video file ingested in autoEdit to meet the specs needed by the speech to text api that it is being used.

Unfortunately each has it's preferred encoding/settings. Eg you can't send the same audio file spec to IBM and pocketsphinx coz it wouldn't work for one or ther other.

## Related projects

First started looking into this when working on a refactor of [quickQuote](http://pietropassarelli.com/quickQuote.html), into a [quickQuote node version](https://github.com/pietrop/quickQuoteNode) making a [twitter export module](https://github.com/pietrop/quickQuoteNode/tree/master/lib/interactive_video_components/export/twitter_video).

## Implementations Options considered

You could also use `spawn` to fork a new ffmpeg process.

## Current implementation

Used fluent ffmpeg, passed ffmpeg as binary option to make it easier to package inside of autoEdit.

## What needs refactoring

At the moment there are two audio converter modules, one for IBM specs, and one for pocketsphinx specs. It be good to unify this code, perhaps pass in configuration variable with audio specs. Perhaps strategy pattern?


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://autoedit.gitbook.io/documentation/master-1.0.6/transcriptions/transcriber/audio-to-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
