- Save the script above as
storytellerin a directory in your PATH (e.g.,/usr/local/bin/) - Make it executable:
chmod +x /usr/local/bin/storyteller - Initialize the environment:
storyteller init
After installation, you can use the following commands:
| # Example compose config for Storyteller | |
| services: | |
| web: | |
| image: docker.io/rampadc/storyteller-v1-tts:latest | |
| # Uncomment for CUDA | |
| # runtime: nvidia | |
| volumes: | |
| # This can be whatever you like; you can even use a | |
| # named volume rather than a bind mount, though it's easier |
| # Power down LOL/LOR and HPL/HPR drivers | |
| w 30 00 01 | |
| w 30 09 00 | |
| ############################################### | |
| # Software Reset | |
| ############################################### | |
| # | |
| # Select Page 0 | |
| w 30 00 00 |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: Workflow | |
| metadata: | |
| generateName: tekton-pipeline- | |
| namespace: default | |
| spec: | |
| entrypoint: pipeline-dag | |
| serviceAccountName: pipeline | |
| templates: | |
| - name: pipeline-dag |
| // Usage | |
| let pixelBuffer: CVImageBuffer? = createPixelBufferFrom(image: image) // see https://gist.github.com/rampadc/10a7dc257552f1fb86c1fcc2d1671bd9 | |
| let sampleBuffer: CMSampleBuffer? = createSampleBufferFrom(pixelBuffer: pixelBuffer) | |
| // Function | |
| func createSampleBufferFrom(pixelBuffer: CVPixelBuffer) -> CMSampleBuffer? { | |
| var sampleBuffer: CMSampleBuffer? | |
| var timimgInfo = CMSampleTimingInfo() | |
| var formatDescription: CMFormatDescription? = nil |
| // Usage - CVImageBuffer and CVPixelBuffer are the same types | |
| let pixelBuffer: CVImageBuffer? = createPixelBufferFrom(image: image) | |
| // How CIContext was declared - used in a MTKView class | |
| device = MTLCreateSystemDefaultDevice() | |
| framebufferOnly = false | |
| colorPixelFormat = .bgra8Unorm | |
| commandQueue = device!.makeCommandQueue() | |
| Config.shared.ciContext = CIContext(mtlDevice: self.device!) |
| I (2826) HID_LE_PRF: HID connection establish, conn_id = 0 | |
| I (2836) HID_DEMO: ESP_HIDD_EVENT_BLE_CONNECT | |
| I (2836) HID_LE_PRF: GATT EVT 4 | |
| I (2846) HID_DEMO: remote BD_ADDR: 8c85908a6d15 | |
| I (2846) HID_DEMO: address type = 0 | |
| I (2856) HID_DEMO: pair status = success | |
| I (2906) HID_LE_PRF: GATT EVT 1 |
| I (2456) EXT_UART: external UART processing task started | |
| I (2466) HID_LE_PRF: GATT EVT 12 | |
| D (13446) BT_SMP: SMDBG l2c smp_connect_callback | |
| I (13446) HID_LE_PRF: HID connection establish, conn_id = 0 | |
| I (13446) HID_DEMO: ESP_HIDD_EVENT_BLE_CONNECT | |
| I (13446) HID_LE_PRF: GATT EVT 4 | |
| D (13456) BT_SMP: SMP_Pair state=0 br_state=0 flag=0x0 | |
| D (13456) BT_SMP: SMDBG l2c smp_connect_callback |