我正在尝试运行以下Python项目:
https://github.com/huanghe314/Text-Independent-Speaker-Indentification-System
这取决于sklearn.mixture.GMM
,但是尽管我已经安装了sklearn
,但找不到该模块。它给出的错误如下:
Traceback (most recent call last):
File "C:/Users/User/PyCharmApp/Text-Independent-Speaker-Indentification-System-master/Code/main.py", line 85, in <module>
p_weight[m] = training.Training_feature_Weight(Name[m] + '.wav')
File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\training.py", line 24, in Training_feature_Weight
Weight_training = Training_info.GMM_Model_Weight()
File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\GMM.py", line 31, in GMM_Model_Weight
weight = mixture.GMM(n_components = self.M, min_covar = 0.01, n_init = 10).fit(self.features).weights_
我正在运行Python 3.6。
答案 0 :(得分:0)
CREATE TRIGGER dbo.TestTrigger
ON YourDatabase.YourSchema.YourTable
AFTER INSERT, UPDATE
AS
BEGIN
DECLARE @NewColumn3 INT;
DECLARE @NewName VARCHAR(25);
DECLARE @NewDepartment VARCHAR(25);
DECLARE @Tab Table (COLUMN3 INT, NAME VARCHAR(25), DEPARTMENT VARCHAR(25));
DECLARE @Message VARCHAR(2000);
INSERT INTO @Tab
SELECT COLUMN3, NAME, DEPARTMENT
FROM INSERTED
IF EXISTS((SELECT COLUMN3 FROM @Tab where COLUMN3 > 0))
BEGIN
--make sure to only add data from rows where COLUMN3 > 0
DECLARE EmailCursor CURSOR FOR
SELECT COLUMN3, NAME, DEPARTMENT FROM @Tab WHERE COLUMN3 > 0
OPEN EmailCursor
FETCH NEXT FROM EmailCursor
INTO @NewVal, @NewName, @NewDepartment
--while there are still rows
WHILE (@@FETCH_STATUS = 0)
BEGIN
--use CONCAT to avoid null value voiding message
SET @Message = CONCAT('Name ', @NewName, ' from department ', @NewDepartment, ' added a value of ', @NewVal)
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'YourProfileName',
@recipients = 'EmailAddress@domain.com',
@body = @Message,
@subject = 'Email Subject';
FETCH NEXT FROM EmailCursor
INTO @NewVal, @NewName, @NewDepartment
END
CLOSE EmailCursor
DEALLOCATE EmailCursor
END
END
在sklearn.mixture.GMM
的当前版本中不再可用:
从版本0.18开始不推荐使用:此类将从0.20中移除。采用 改为
sklearn
。
鉴于此,我相信您的选择是更改代码以使用sklearn.mixture.GaussianMixture
或降级您的GaussianMixture
版本。