rbrisita / codio-sui

A media format for VS Code to record and playback the process of programming.
GNU Affero General Public License v3.0
11 stars 3 forks source link

Codio Could not find an audio recording device #54

Open laurentHYZ opened 3 years ago

laurentHYZ commented 3 years ago

hi there! Codio looks like an amazing tool, I look forward to using it, right now I am having trouble: codio I get the following error message, Codio Could not find an audio recording device thank you very much laurent

additional info: I have ffmpeg installed. When in the terminal I type "ffmpeg -version" and get the following: ffmpeg -version ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100

rbrisita commented 3 years ago

Hello! Thank you for reporting the issue. I just added Linux support to version 0.9.0 from a Linux/ARM PineBook Pro. Please let me know if this resolved the issue.

I also want to make clear that this repository is a fork of the original as I am adding to satisfy my own needs. It will be renamed once I hit a stable version targeting all supported OSes.

rbrisita commented 2 years ago

@laurentHYZ Appreciate it if you could please report back your experience when you have the time.

https://github.com/rbrisita/codio-sui/releases/tag/v0.10.25

laurentHYZ commented 2 years ago

Hi, thank you for your message, so today I tried to build and got an error message

`❯ git clone git@github.com:rbrisita/codio-sui.git Cloning into 'codio-sui'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. `

rbrisita commented 2 years ago

This has to do with setting up SSH keys for your account. Please read:

https://docs.github.com/en/enterprise-server@3.4/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

Further, you could just download the compiled VSIX from here:

https://github.com/rbrisita/codio-sui/releases/download/v0.10.25/codio-sui-0.10.25.vsix

And read the install instructions here:

https://github.com/rbrisita/codio-sui/tree/master/vscode#install

laurentHYZ commented 2 years ago

Thank you, I added they key to Github. I was able to build as explained here https://github.com/rbrisita/codio-sui/blob/master/vscode/README.md

Now with the Installation step I am not sure where from I should run it. The link above says to run a certain script from a working folder. Which working folder should that be from? I ran the script below from my working directory / home directory but that's not working.

thank you forehand, laurent

INSTALL In a working folder: code --extensions-dir ..vscode\extensions --install-extension codio-sui-0.10.25.vsix --force

Run In the same working folder: code --extensions-dir ..vscode\extensions .

rbrisita commented 2 years ago

A working folder (project folder) aka workspace would be a folder containing code that you want to manipulate. In this sense, to play or record a codio.

The folders:

Should exist already in the working folder.

The command code is an optional install that VSCode provides.

Running the install and run commands creates a VSCode instance with locally installed extensions, meaning not globally installed. Better for testing purposes.

You'll also have to trust the folder to allow the extension to work. Workspace Trust is on the list to be reviewed and increasing usability more; like install and run being merged with better environment checks.

laurentHYZ commented 2 years ago

There is something in the installation process that I am missing, do you think you could try the steps yourself just to make sure that your installation is up to date and simple enough ?

RIght now the following 2 folders you mentioned are in my home directory

when I run 693 code --extensions-dir ..vscode\extensions --install-extension codio-sui-0.10.25.vsix --force

I get an error message : Installing extensions... ENOENT: no such file or directory, open '/home/laurent/codio-sui-0.10.25.vsix' Failed Installing Extensions: file:///home/laurent/codio-sui-0.10.25.vsix

I don't want to have to bother you with details everyday, maybe you can try to think about each step of the installation process as if you were a beginner. thank you for everything laurent


From: Robert Brisita @.> Sent: Thursday, April 21, 2022 7:18 PM To: rbrisita/codio-sui @.> Cc: laurent @.>; Mention @.> Subject: Re: [rbrisita/codio-sui] Codio Could not find an audio recording device (Issue #54)

A working folder (project folder) aka workspace would be a folder containing code that you want to manipulate. In this sense, to play or record a codio.

The folders:

Should exist already in the working folder.

The command code is an optional installhttps://code.visualstudio.com/docs/editor/command-line#_launching-from-command-line that VSCode provides.

Running the install and run commands creates a VSCode instance with locally installed extensions, meaning not globally installed. Better for testing purposes.

You'll also have to trust the folder to allow the extension to work. Workspace Trust is on the list to be reviewed and increasing usability more; like install and run being merged with better environment checks.

— Reply to this email directly, view it on GitHubhttps://github.com/rbrisita/codio-sui/issues/54#issuecomment-1105660195, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABZSZXHEKWBFP67FEDKQL53VGGSYJANCNFSM5HIGTFIQ. You are receiving this because you were mentioned.Message ID: @.***>

rbrisita commented 2 years ago

I understand, I am aiming to make the process as easy as possible so this is beneficial to me and I will update instructions in the next minor version release or so.

From the error shown, it is conveying this information:

For the code commands to be successful ensure that these commands produce valid output:

ls -lah /home/laurent/ ls -lah /home/laurent/codio-sui-0.10.25.vsix ls -lah /home/laurent/.vscode/ ls -lah /home/laurent/.vscode/extensions/

I would add though that it is better to have a specific folder, maybe /home/laurent/test_codio-sui/ to test this rather than your home folder. The home folder contains its own .vscode folder for settings.

laurentHYZ commented 2 years ago

❯ tree -L 2 test_codio-sui/codio-sui/ test_codio-sui/codio-sui/ ├── assets │   ├── black_big.png │   └── black_small.png ├── docs │   ├── contributing.md │   ├── roadmap.md │   ├── spec.md │   ├── vscode-docs.md │   └── web-docs.md ├── LICENSE.md ├── README.md └── vscode ├── CHANGELOG.md ├── codio.d.ts ├── codio-sui-0.10.27.vsix ├── dependencies ├── media ├── node_modules ├── out ├── package.json ├── package-lock.json ├── README.md ├── src ├── tsconfig.json ├── tslint.json └── webpack.config.js

then inside the vscode folder contained by the above tree one can find: /.code/ containing /extensions

In short the vsix is not located in the right location. What do you recommend?

rbrisita commented 2 years ago

I suggest to simplify by having an empty test folder with created sub-folder structure (.vscode/extensions) and a copy of the built VSIX file in the root of the test folder; just three objects:

codio-sui-0.10.25.vsix
./.vscode
./.vscode/extensions

Then please reread the directions and if need be, along with the comments made to this issue substituting examples with the test folder you are using:

  1. https://github.com/rbrisita/codio-sui/issues/54#issuecomment-1105660195
  2. https://github.com/rbrisita/codio-sui/issues/54#issuecomment-1106762798

My assumptions for the directions to be successful are that there is an understanding of correct path access depending on the OS being used and an understanding of command line parameters and arguments.

NyerhovwoOnitcha commented 1 month ago

Hello, firstly, thank you for updating this extension. I'm having the same "Codio can't find any recording device issue". I followed the steps outlined. Here is my code.

Please note I'm using ubuntu on WSL2: 1- I cloned the repo and ran the `npx vsce package command and the VSIX file was created with the output Below

Executing prepublish script 'npm run vscode:prepublish'...

> codio-sui@0.14.36 vscode:prepublish
> npx rimraf out && npx rimraf codio-*.vsix && npm run esbuild-base -- --minify

> codio-sui@0.14.36 esbuild-base
> esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --minify

  out/extension.js  64.1kb

⚡ Done in 65ms
 DONE  Packaged: /home/pauly/codio-sui/codio-sui-0.14.36.vsix (13 files, 40.49KB)
1_codio vsix created

2- I created a workspace, added both the .vscode and .vscode/extention folder as well as the VSIX file. ls Output below:

-rw-r--r--  1 pauly pauly 41460 Sep 21 07:24 codio-sui-0.14.36.vsix
drwxr-xr-x  3 pauly pauly  4096 Sep 21 07:25 .vscode
drwxr-xr-x  2 pauly pauly  4096 Sep 21 07:34 .codio
2_ workspace created and populated

3- I installed the extension. The output is below: From the output it's clear that the extension is installed in my global extensions dir. I tried specifying the full path to the workspace extension dir when running the install command but it still gives the same result.

Ignoring option 'extensions-dir': not supported for code.
Installing extensions...
Extension 'codio-sui-0.14.36.vsix' was successfully installed.
3_extension installed

4- Since the extension is installed globally there's no need to disable trust (for good measure I did this later but it didn't change anything). When I try to record from my vscode it gives the Codio could not find a recording device

4_vscode error

I've tested my laptop microphone and it's working perfectly.

rbrisita commented 1 month ago

First, I recommend using the extension on the host OS and not a virtual OS. It was never tested on a virtual environment and is a feature that was going to be looked into.

In the past, WSL has issues with audio, but it seems to have been fixed with installing PulseAudio through the OS distribution. I would say first test to try to record an audio file through WSL using arecord or parecord; depends on chosen *nix system. Once that works then ffmpeg should work also, allowing the extension to work too.

In a different communication channel, you mentioned:

I updated my WSL and vs code I installed PulseAudio on my WSL, I was able to record audio using PulseAudio and ffmpeg but........The codio still can't find audio recording device

I don't have the bandwidth to test myself at the moment but could you please display the console log output, particularly expanding the deviceList output?

NyerhovwoOnitcha commented 1 month ago

Hello, The console log output on my vs code:

device list
NyerhovwoOnitcha commented 1 month ago

So after a lot of tinkering I've been able to get the extension to get it to work. I will drop a detailed steps later. This tutorial was very useful though. https://www.linuxuprising.com/2021/03/how-to-get-sound-pulseaudio-to-work-on.html

NyerhovwoOnitcha commented 1 month ago

Hello, I did get the codio extension to record but I ran into other issues. 1- I recorded a file and played it and it was all good. 2 days later I'm playing the file and now there's no audio. 2- I can't really record anymore more cos when it starts recording the controls to pause, resume and save don't work. It just keeps on recording forever.

At this point I'm thinking I will just try it out in my windows OS and stick to that.