Guest User

Untitled

a guest
May 25th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. {
  2. "name": "Local AI Voice Assistant",
  3. "nodes": [
  4. {
  5. "parameters": {
  6. "command": "arecord -f cd -t wav -d 5 -r 16000 input.wav"
  7. },
  8. "id": "1",
  9. "name": "Record Voice Input",
  10. "type": "n8n-nodes-base.exec",
  11. "typeVersion": 1,
  12. "position": [250, 300]
  13. },
  14. {
  15. "parameters": {
  16. "functionCode": "const fs = require('fs');\nconst audioData = fs.readFileSync('input.wav');\nreturn [{ json: { audio: audioData.toString('base64') } }];"
  17. },
  18. "id": "2",
  19. "name": "Prepare Audio for Transcription",
  20. "type": "n8n-nodes-base.function",
  21. "typeVersion": 1,
  22. "position": [450, 300]
  23. },
  24. {
  25. "parameters": {
  26. "resource": "audio",
  27. "operation": "transcribe",
  28. "audioData": "={{$json[\"audio\"]}}"
  29. },
  30. "id": "3",
  31. "name": "Whisper Transcription",
  32. "type": "n8n-nodes-base.openai",
  33. "typeVersion": 1,
  34. "position": [650, 300]
  35. },
  36. {
  37. "parameters": {
  38. "prompt": "={{$json[\"text\"]}}",
  39. "model": "gpt-4",
  40. "temperature": 0.7
  41. },
  42. "id": "4",
  43. "name": "LLM Response",
  44. "type": "n8n-nodes-base.openai",
  45. "typeVersion": 1,
  46. "position": [850, 300]
  47. },
  48. {
  49. "parameters": {
  50. "url": "https://api.elevenlabs.io/v1/text-to-speech/mykey",
  51. "method": "POST",
  52. "bodyParametersUi": {
  53. "parameter": [
  54. {
  55. "name": "text",
  56. "value": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}"
  57. },
  58. {
  59. "name": "voice_settings",
  60. "value": "{\"stability\": 0.5, \"similarity_boost\": 0.75}"
  61. }
  62. ]
  63. },
  64. "headers": {
  65. "Accept": "audio/mpeg",
  66. "xi-api-key": "mykey"
  67. }
  68. },
  69. "id": "5",
  70. "name": "Text to Speech - ElevenLabs",
  71. "type": "n8n-nodes-base.httpRequest",
  72. "typeVersion": 1,
  73. "position": [1050, 300]
  74. },
  75. {
  76. "parameters": {
  77. "command": "python3 /path/to/rvc_infer.py --input output.mp3 --model /path/to/rvc_model.pth --output final_output.wav"
  78. },
  79. "id": "6",
  80. "name": "Convert Voice with RVC",
  81. "type": "n8n-nodes-base.exec",
  82. "typeVersion": 1,
  83. "position": [1250, 300]
  84. },
  85. {
  86. "parameters": {
  87. "command": "aplay final_output.wav"
  88. },
  89. "id": "7",
  90. "name": "Play Final Audio",
  91. "type": "n8n-nodes-base.exec",
  92. "typeVersion": 1,
  93. "position": [1450, 300]
  94. }
  95. ],
  96. "connections": {
  97. "1": {
  98. "main": [
  99. [{ "node": "2", "type": "main", "index": 0 }]
  100. ]
  101. },
  102. "2": {
  103. "main": [
  104. [{ "node": "3", "type": "main", "index": 0 }]
  105. ]
  106. },
  107. "3": {
  108. "main": [
  109. [{ "node": "4", "type": "main", "index": 0 }]
  110. ]
  111. },
  112. "4": {
  113. "main": [
  114. [{ "node": "5", "type": "main", "index": 0 }]
  115. ]
  116. },
  117. "5": {
  118. "main": [
  119. [{ "node": "6", "type": "main", "index": 0 }]
  120. ]
  121. },
  122. "6": {
  123. "main": [
  124. [{ "node": "7", "type": "main", "index": 0 }]
  125. ]
  126. }
  127. }
  128. }
  129.  
Add Comment
Please, Sign In to add comment