💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Update documentation
davidmezzetti07fa511211ce
diff --git a/docs/pipeline/audio/audiomixer.md b/docs/pipeline/audio/audiomixer.mdnew file mode 100644index 00000000..6a35ad3b--- /dev/null+++ b/docs/pipeline/audio/audiomixer.md@@ -0,0 +1,62 @@+# Audio Mixer+++++The Audio Mixer pipeline mixes multiple audio streams into a single stream.++## Example++The following shows a simple example using this pipeline.++```python+from txtai.pipeline import AudioMixer++# Create and run pipeline+mixer = AudioMixer()+mixer(((audio1, rate1), (audio2, rate2)))+```++## Configuration-driven example++Pipelines are run with Python or configuration. Pipelines can be instantiated in [configuration](../../../api/configuration/#pipeline) using the lower case name of the pipeline. Configuration-driven pipelines are run with [workflows](../../../workflow/#configuration-driven-example) or the [API](../../../api#local-instance).++### config.yml+```yaml+# Create pipeline using lower case class name+audiomixer:++# Run pipeline with workflow+workflow:+ audiomixer:+ tasks:+ - action: audiomixer+```++### Run with Workflows++```python+from txtai import Application++# Create and run pipeline with workflow+app = Application("config.yml")+list(app.workflow("audiomixer", [[[audio1, rate1], [audio2, rate2]]]))+```++### Run with API++```bash+CONFIG=config.yml uvicorn "txtai.api:app" &++curl \+ -X POST "http://localhost:8000/workflow" \+ -H "Content-Type: application/json" \+ -d '{"name":"audiomixer", "elements":[[[audio1, rate1], [audio2, rate2]]]}'+```++## Methods++Python documentation for the pipeline.++### ::: txtai.pipeline.AudioMixer.__init__+### ::: txtai.pipeline.AudioMixer.__call__diff --git a/docs/pipeline/audio/audiostream.md b/docs/pipeline/audio/audiostream.mdindex 4674cadb..3399a3a4 100644--- a/docs/pipeline/audio/audiostream.md+++ b/docs/pipeline/audio/audiostream.md@@ -42,7 +42,7 @@ from txtai import Application# Create and run pipeline with workflowapp = Application("config.yml")-list(app.workflow("audiostream", ["numpy data"]))+list(app.workflow("audiostream", [["numpy data", "sample rate"]]))```### Run with API@@ -53,7 +53,7 @@ CONFIG=config.yml uvicorn "txtai.api:app" &curl \-X POST "http://localhost:8000/workflow" \-H "Content-Type: application/json" \- -d '{"name":"audiostream", "elements":["numpy data"]}'+ -d '{"name":"audiostream", "elements":[["numpy data", "sample rate"]]}'```## Methodsdiff --git a/docs/pipeline/audio/texttoaudio.md b/docs/pipeline/audio/texttoaudio.mdnew file mode 100644index 00000000..3ef3b98b--- /dev/null+++ b/docs/pipeline/audio/texttoaudio.md@@ -0,0 +1,62 @@+# Text To Audio+++++The Text To Audio pipeline generates audio from text.++## Example++The following shows a simple example using this pipeline.++```python+from txtai.pipeline import TextToAudio++# Create and run pipeline+tta = TextToAudio()+tta("Describe the audio to generate here")+```++## Configuration-driven example++Pipelines are run with Python or configuration. Pipelines can be instantiated in [configuration](../../../api/configuration/#pipeline) using the lower case name of the pipeline. Configuration-driven pipelines are run with [workflows](../../../workflow/#configuration-driven-example) or the [API](../../../api#local-instance).++### config.yml+```yaml+# Create pipeline using lower case class name+texttoaudio:++# Run pipeline with workflow+workflow:+ tta:+ tasks:+ - action: texttoaudio+```++### Run with Workflows++```python+from txtai import Application++# Create and run pipeline with workflow+app = Application("config.yml")+list(app.workflow("tta", ["Describe the audio to generate here"]))+```++### Run with API++```bash+CONFIG=config.yml uvicorn "txtai.api:app" &++curl \+ -X POST "http://localhost:8000/workflow" \+ -H "Content-Type: application/json" \+ -d '{"name":"tta", "elements":["Describe the audio to generate here"]}'+```++## Methods++Python documentation for the pipeline.++### ::: txtai.pipeline.TextToAudio.__init__+### ::: txtai.pipeline.TextToAudio.__call__diff --git a/docs/pipeline/audio/texttospeech.md b/docs/pipeline/audio/texttospeech.mdindex c9e8a3ac..98195eb6 100644--- a/docs/pipeline/audio/texttospeech.md+++ b/docs/pipeline/audio/texttospeech.md@@ -25,6 +25,10 @@ yield from tts(# Generate audio using a speaker idtts = TextToSpeech("neuml/vctk-vits-onnx")tts("Say something here", speaker=15)++# Generate audio using speaker embeddings+tts = TextToSpeech("neuml/txtai-speecht5-onnx")+tts("Say something here", speaker=np.array(...))```See the link below for a more detailed example.@@ -38,6 +42,7 @@ This pipeline is backed by ONNX models from the Hugging Face Hub. The following- [ljspeech-jets-onnx](https://huggingface.co/NeuML/ljspeech-jets-onnx)- [ljspeech-vits-onnx](https://huggingface.co/NeuML/ljspeech-vits-onnx)- [vctk-vits-onnx](https://huggingface.co/NeuML/vctk-vits-onnx)+- [txtai-speecht5-onnx](https://huggingface.co/NeuML/txtai-speecht5-onnx)## Configuration-driven examplediff --git a/docs/pipeline/index.md b/docs/pipeline/index.mdindex 4b831a96..8f11bf2b 100644--- a/docs/pipeline/index.md+++ b/docs/pipeline/index.md@@ -12,8 +12,10 @@ Pipelines are run with Python or configuration. Pipelines can be instantiated inThe following is a list of the default pipelines available in txtai. All pipelines use default models when otherwise not specified. See the [model guide](../models) for the current model recommentations.- Audio+ - [AudioMixer](audio/audiomixer)- [AudioStream](audio/audiostream)- [Microphone](audio/microphone)+ - [TextToAudio](audio/texttoaudio)- [TextToSpeech](audio/texttospeech)- [Transcription](audio/transcription)- Data Processingdiff --git a/mkdocs.yml b/mkdocs.ymlindex cc86eee2..2a3b960f 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -74,8 +74,10 @@ nav:- Pipeline:- pipeline/index.md- Audio:+ - Audio Mixer: pipeline/audio/audiomixer.md- Audio Stream: pipeline/audio/audiostream.md- Microphone: pipeline/audio/microphone.md+ - Text To Audio: pipeline/audio/texttoaudio.md- Text To Speech: pipeline/audio/texttospeech.md- Transcription: pipeline/audio/transcription.md- Data: