Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "Local AI Voice Assistant",
- "nodes": [
- {
- "parameters": {
- "command": "arecord -f cd -t wav -d 5 -r 16000 input.wav"
- },
- "id": "1",
- "name": "Record Voice Input",
- "type": "n8n-nodes-base.exec",
- "typeVersion": 1,
- "position": [250, 300]
- },
- {
- "parameters": {
- "functionCode": "const fs = require('fs');\nconst audioData = fs.readFileSync('input.wav');\nreturn [{ json: { audio: audioData.toString('base64') } }];"
- },
- "id": "2",
- "name": "Prepare Audio for Transcription",
- "type": "n8n-nodes-base.function",
- "typeVersion": 1,
- "position": [450, 300]
- },
- {
- "parameters": {
- "resource": "audio",
- "operation": "transcribe",
- "audioData": "={{$json[\"audio\"]}}"
- },
- "id": "3",
- "name": "Whisper Transcription",
- "type": "n8n-nodes-base.openai",
- "typeVersion": 1,
- "position": [650, 300]
- },
- {
- "parameters": {
- "prompt": "={{$json[\"text\"]}}",
- "model": "gpt-4",
- "temperature": 0.7
- },
- "id": "4",
- "name": "LLM Response",
- "type": "n8n-nodes-base.openai",
- "typeVersion": 1,
- "position": [850, 300]
- },
- {
- "parameters": {
- "url": "https://api.elevenlabs.io/v1/text-to-speech/mykey",
- "method": "POST",
- "bodyParametersUi": {
- "parameter": [
- {
- "name": "text",
- "value": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}"
- },
- {
- "name": "voice_settings",
- "value": "{\"stability\": 0.5, \"similarity_boost\": 0.75}"
- }
- ]
- },
- "headers": {
- "Accept": "audio/mpeg",
- "xi-api-key": "mykey"
- }
- },
- "id": "5",
- "name": "Text to Speech - ElevenLabs",
- "type": "n8n-nodes-base.httpRequest",
- "typeVersion": 1,
- "position": [1050, 300]
- },
- {
- "parameters": {
- "command": "python3 /path/to/rvc_infer.py --input output.mp3 --model /path/to/rvc_model.pth --output final_output.wav"
- },
- "id": "6",
- "name": "Convert Voice with RVC",
- "type": "n8n-nodes-base.exec",
- "typeVersion": 1,
- "position": [1250, 300]
- },
- {
- "parameters": {
- "command": "aplay final_output.wav"
- },
- "id": "7",
- "name": "Play Final Audio",
- "type": "n8n-nodes-base.exec",
- "typeVersion": 1,
- "position": [1450, 300]
- }
- ],
- "connections": {
- "1": {
- "main": [
- [{ "node": "2", "type": "main", "index": 0 }]
- ]
- },
- "2": {
- "main": [
- [{ "node": "3", "type": "main", "index": 0 }]
- ]
- },
- "3": {
- "main": [
- [{ "node": "4", "type": "main", "index": 0 }]
- ]
- },
- "4": {
- "main": [
- [{ "node": "5", "type": "main", "index": 0 }]
- ]
- },
- "5": {
- "main": [
- [{ "node": "6", "type": "main", "index": 0 }]
- ]
- },
- "6": {
- "main": [
- [{ "node": "7", "type": "main", "index": 0 }]
- ]
- }
- }
- }
Add Comment
Please, Sign In to add comment