Support for Audio Files (#1416)
This commit is contained in:
25
docs/components/data-sources/audio.mdx
Normal file
25
docs/components/data-sources/audio.mdx
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "🎤 Audio"
|
||||
---
|
||||
|
||||
|
||||
To use an audio as data source, just add `data_type` as `audio` and pass in the path of the audio (local or hosted).
|
||||
|
||||
We use [Deepgram](https://developers.deepgram.com/docs/introduction) to transcribe the audiot to text, and then use the generated text as the data source.
|
||||
|
||||
You would require an Deepgram API key which is available [here](https://console.deepgram.com/signup?jump=keys) to use this feature.
|
||||
|
||||
### Without customization
|
||||
|
||||
```python
|
||||
import os
|
||||
from embedchain import App
|
||||
|
||||
os.environ["DEEPGRAM_API_KEY"] = "153xxx"
|
||||
|
||||
app = App()
|
||||
app.add("introduction.wav", data_type="audio")
|
||||
response = app.query("What is my name and how old am I?")
|
||||
print(response)
|
||||
# Answer: Your name is Dave and you are 21 years old.
|
||||
```
|
||||
@@ -9,6 +9,7 @@ Embedchain comes with built-in support for various data sources. We handle the c
|
||||
<Card title="CSV file" href="/components/data-sources/csv"></Card>
|
||||
<Card title="JSON file" href="/components/data-sources/json"></Card>
|
||||
<Card title="Text" href="/components/data-sources/text"></Card>
|
||||
<Card title="Text File" href="/components/data-sources/text-file"></Card>
|
||||
<Card title="Directory" href="/components/data-sources/directory"></Card>
|
||||
<Card title="Web page" href="/components/data-sources/web-page"></Card>
|
||||
<Card title="Youtube Channel" href="/components/data-sources/youtube-channel"></Card>
|
||||
@@ -33,6 +34,7 @@ Embedchain comes with built-in support for various data sources. We handle the c
|
||||
<Card title="Beehiiv" href="/components/data-sources/beehiiv"></Card>
|
||||
<Card title="Dropbox" href="/components/data-sources/dropbox"></Card>
|
||||
<Card title="Image" href="/components/data-sources/image"></Card>
|
||||
<Card title="Audio" href="/components/data-sources/audio"></Card>
|
||||
<Card title="Custom" href="/components/data-sources/custom"></Card>
|
||||
</CardGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user