Closed develowear closed 3 years ago
Thank you @develowear for this very detailed report. I'm sorry for the trouble you've got, but I'm uncertain if I can help you.
The issue seems to be very similar to #108 . To that time we tried a Ruby-2.3.4 compiled with a modern msys2-mingw-gcc and it showed the same error as all newer rubies. So there's some incompatibility between OLE and recent MINGW toolchain. However I didn't dig deeper into the generated assembly code.
Did you already file an issue on http://bugs.ruby-lang.org ?
I should have written the version of Ruby 2.3.x I was using. I usually used the following. rubyinstaller-2.3.1.exe ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
I tried to use the following in CeVIO CS6. ruby-2.3.3-i386-mingw32.7z ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
I've never used Ruby 2.3.4 or later.
I have not reported any problems to http://bugs.ruby-lang.org. To me, a similar problem seemed to have already been reported about win32ole. Also, it didn't seem to solve. Therefore, I thought that the report destination was a RubyInstaller site, and I reported it here.
I don't have an account with bugs.ruby-lang.org yet and I haven't reported it yet. Also, the reason I reported it here was that it was difficult to understand how to report to bugs.ruby-lang.org.
If the accuracy of the machine translation of the WEB did not improve, I think that I did not report anywhere.
In my test If you use ruby built in vagrant, you can call CeVIO successfully.
vagrant_2.2.6_i686\HashiCorp\Vagrant\embedded\mingw32\bin\ruby -v
ruby 2.4.9p362 (2019-10-02 revision 67824) [i386-mingw32]
However, even if you port win32ole.so from vagrant, rubyinstaller2 still fails.
I don't understand why.
win32ole.so(V): Vagrant_2.2.6_i686.msi win32ole.so win32ole.so(R): rubyinstaller-2.4.9-1-x86.7z win32ole.so It is abbreviated as described above. Both are ruby 2.4.9p362 (2019-10-02 revision 67824) [i386-mingw32].
I also tried the following in the same way. I copied win32ole.so(V) to the rubyinstaller-2.4.9-1-x86\lib\ruby\2.4.0\i386-mingw32 folder. Result: An error was issued. Therefore, TTS was not able to be done by CeVIO.
I also tried the following. I copied win32ole.so(R) to the Vagrant\embedded\mingw32\lib\ruby\2.4.0\i386-mingw32 folder. Result: There were no errors. Therefore, TTS was able to be done with CeVIO.
RubyInstaller-2.4+ makes use of a new DLL loading mechanism, that was introduced with Windows-7: https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#user-content-dll-loading
Possibly the Speak
method tries to load a DLL internally and fails. This was solved in #71 per RUBY_DLL_PATH
.
RubyInstaller::Runtime.add_dll_directory("C:\\Program Files (x86)\\CeVIO\\CeVIO Creative Studio")
or
set RUBY_DLL_PATH="C:\Program Files (x86)\CeVIO\CeVIO Creative Studio"
I tried with tts-sapi.rb and tts-cevio-simple.rb as above, but RubyInstaller 2.4, 2.5, 2,6 failed in win32ole and couldn't TTS in CeVIO.
Neither RUBY_DLL_PATH
nor add_dll_directory
support quoted paths, so you must use something like
set RUBY_DLL_PATH=C:\Program Files (x86)\CeVIO\CeVIO Creative Studio;c:/next/path
But you can use forward slashs if you like.
Maybe CeVIO has several directories for DLL or expects some third party DLL. You can debug Windows DLL loading as described here. The DLL loader output is very verbose and not so easy to read, but can help to track the issue down.
After removing lib\ruby\3.0.0\rubygems\defaults\operating_system.rb as per the above method, it now works without any errors in win32ole.
The same method worked for Ruby 2.6. Probably the same for 2.4 and above.
CeVIO Creative Studio 7 is a 64-bit version, but it worked in the same way using the 64-bit version of Ruby.
Cevio DL site http://guide2.project-cevio.com/
Download of CeVio CS6 32-bit version can be obtained from the link in the string below on the above site. "CeVIO CS6以前のバージョンはこちら"
What problems are you experiencing?
2.3.x works, but the following errors are <=2.4.9, <=2.5.7 , and <=2.6.5 . For a long time, Ruby had been getting errors with win32ole since 2.4. Since 2.4 or later, I have been using 2.3.x for problems that cause the error.
Fails to control TTS application CeVIO Creative Studio 6 with win32ole. CeVIO Creative Studio 6 can do Japanese TTS and vocal music.
Steps to reproduce
Install CeVIO Creative Studio 6
CeVIO Creative Studio 6 (30-day free trial). The product page is as follows. http://cevio.jp/downloads/
Download CeVIO_Creative_StudioSetup(6.X.XX.X).msi from [ CeVIO Creative Studio 6【無料体験版】ダウンロード ] of the above URL.
Install CeVIO_Creative_StudioSetup(6.X.XX.X).msi. [ 次へ(N)> ] Next (Installation Guidance) ●同意する [ 次へ(N)> ] Next (I agree to the license.) [ 次へ(N)> ] Next (Install Folder) [ 次へ(N)> ] Next (Install Progress Bar) [ 閉じる(C) ] Close (The exit of the installation.)
Start CeVIO CS6. Wait for a while (up to 80 seconds).
ライセンス認証 dialog (Activation dialog) ●体験版を開始する (Start 30-day free trial) [OK]
You are now ready to call CeVIO from Ruby.
Write code for CeVIO TTS via Microsoft SAPI5
tts-sapi.rb
Run tts_sapi.rb.
As a result, 2.4, 2.5, 2.6 errors are issued. However, it does not occur in 2.3.
Before the above error, the dialog of "Talker作成失敗 (Talker Creation Failure)" is displayed four times. Perhaps the four voices CeVIO-さとうささら, CeVIO-すずきつづみ, CeVIO-タカハシ, and CeVIO-ONE are related to those four error dialogs.
The index of the voice cast may vary depending on the language version of Windows.
Write code for CeVIO TTS without using Microsoft SAPI5
tts-cevio-simple.rb
Run tts-cevio-simple.rb.
As a result, 2.4, 2.5, 2.6 errors are issued. However, it does not occur in 2.3.
CeVIO CS6 Interface
http://guide2.project-cevio.com/interface
What's the output from
ridk version
?2.4, 2.5, 2.6 any version fails.
Note
CeVIO Creative Studio 6 is now a 32-bit application. Therefore, Ruby uses the 32-bit version.
CeVIO Creative Studio 6 may take a lot of time to verify because the product deals with Japanese. Therefore, I hesitated to report it for a long time. Even under other circumstances that do not seem to be so, the following error is occurring with respect to win32ole is the same problem?